Hi, I have a field in my MySQL database that is DATETIME and has the value 2003-09-08 23:34:15. Now once I pull this out into a PHP variable, how can I convert it so it shows the full fancy date? (e.g. September 8, 2003, 11:34:15 PM). Thanks!
Use [man]date/man and [man]strtotime[/man]
eg.
$row = mysql_fetch_array($result); $niceDate = date('F jS, Y h:i:s A', strtottime($row['thedate']));
hth
thanks, just you scrwed up on one little thing (took me awhile to realise what)
strtottime
should be
strtotime
thanks