i have a mysql table with column type DATETIME, i want it to display like 19 Aug, 2013. so i have tried with
echo $date = date('Y-m-d H:i:s');
echo '<br/>';
echo date('y M ,Y',strtotime($date));
The output im getting is
2013-08-19 22:47:12
13 Aug ,2013
The i tried with
$datetime = DateTime::createFromFormat('Y-m-d', '2013-08-19');
echo $datetime->format('yM,Y');
But it also outputs the wrong date 13Aug,2013 Any one have faced the same kind of issue.