Re: [PHP-DB] Date formatting question

[email protected] (Chris)
Newsgroups php.db
Message-ID <[email protected]>
Jack Lauman wrote:
> I need to reformat the output of the 'dates' field from '2009-04-08' to 
> 'Wed. Apr. 8th'. Any help would be appreciated.

You can either do it using mysql date formats (see 
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format) 
or something like date('...', strtotime($result->date));

See http://php.net/date and http://php.net/strtotime

-- 
Postgresql & php tutorials
http://www.designmagick.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.