29-05-2010

PHP formatting retrieved mysql datetime

to format a mysql datetime to your needs use something like:

echo date("F j, Y, g:i a",strtotime($mysql_datefield));

Which will yield a date formatted like so:

April 18, 2010, 2:49 pm

See the php date function documentation for date formatting syntax.

Comments:

Your comment:

»

 

[x]