string - Format a date for PHP -
this question has answer here:
- convert 1 date format in php 12 answers
i have date:
mon, 31 mar 2014 12:19:10 gmt
how can convert format:
date('y-m-d h:i:s')
i have found this:
$time = strtotime('10/16/2003');
$newformat = date('y-m-d',$time);
but how convert 'mar' '03', can use that?
how using datetime
$date = new datetime("mon, 31 mar 2014 12:19:10 gmt"); echo $date->format("y-m-d h:i:s");
Comments
Post a Comment