I some php code which gets info from a mysql database. The problem is that the date is coming out in the format : \"2010-02-03 22:21:26\"
Does anyone kn
See strtotime() and date()
e.g., 2010-02-03 22:21:26
to 3rd February 2010 at 22:21
:
$DateTimeStr = '2010-02-03 22:21:26';
echo date('jS F Y \a\t G:i', strtotime($DateTimeStr));
Or use the datetime-class.
date() function will assist you in this.
Something like
$date = date('j F, Y h:i:s', strtotime($date_value));
print $date;
Format options:
http://www.php.net/manual/en/function.date.php