Welcome Guest, Not a member yet? Register   Sign In
Convert a date, which is stored in a mysql database [SOLVED]
#6

[eluser]Phil Sturgeon[/eluser]
No digging required.

Code:
$datetime = new DateTime($r->date);
echo $datetime->format('jS, F Y');

If you are feeling REALLY lazy...

Code:
<?php echo date('jS, F Y', strtotime($r->date));?>

I would go with DateTime though, much more useful.


Messages In This Thread
Convert a date, which is stored in a mysql database [SOLVED] - by El Forum - 11-11-2009, 04:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB