Best way, as told many times before:
Take one mysql datetime field and
in php
1. convert it to Unix timestamp using [man]strtotime/man
2. use php [man]date[/man] to format any way from the PHP/Unix timestamp
Your Example:
<?php
$mysqltime = '2010-03-02 23:03:34';
$unixtime = strtotime($mysqltime);
$date = date('jS F Y', $unixtime);
echo $mysqltime;
echo '<br />';
echo $date; // '2nd March 2010'
///this works, too, of course in only one line.
// convert from MySQL datetime
$date2 = date('jS F Y', strtotime($mysqltime));
echo '<br />';
echo $date2;
?>
If you had search forum better for datetime
you would get 1000 of hits :rolleyes: