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 know a simple solution to make the date more user friendly format. e.g
2nd march 2010 at 22:21.
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));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With