echo date("jS M Y",strtotime("2010-04-15 23:59:59"));
In addition to using date and strtotime, you can do
date
strtotime
$dateTime = new DateTime('2010-04-15 23:59:59');echo $dateTime->format('jS M Y'); // 15th Apr 2010
or
$dateTime = date_create('2010-04-15 23:59:59');echo date_format($dateTime, 'jS M Y'); // 15th Apr 2010
$date = date("dS M Y",strtotime("2010-04-15 23:59:59"));print $date;