Re: how should MS Access DATETIME be handled in PHP?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't know if MS Access will behave the same, but in MySQL you can
have a query like so:

SELECT *, DATE_FORMAT(end_date, '%d %m %Y') as end_date_formatted FROM projects;

And it will retrieve all columns from your projects table, plus the
extra one you've created on the fly, and it will be named
"end_date_formatted".

HTH,
John W

On 4/19/06, Bing Du <bdu@xxxxxxxxxxx> wrote:
> > Do the search as Richard suggested.
> >
> > MS Access might have a similar function you can use, but you'll need
> > to do some searching yourself to find the answer.
> >
> Sure.  I always appreciate various opinions.  I've checked with an Access
> expert.  It can be done for Access like Format([DateFieldName], "dddd mmmm
> yyyy").  But if fields of date type should be formated as needed in the
> query, there is one situation in which I'm not clear how that would work.
> Say, I need to query all the fields from a table which has quite a fields.
>  Some of the fields are of some kind of date type.  Enumerating the fields
> is not feasible.
>
> SELECT * from table;
>
> So in this case, how should the date fields be formated in the query?
>
> Thanks,
>
> Bing
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux