I want to convert php date from Y-F-d format to Y-m-d format. I use the code below.
<?php
$originalDate = "2014-March-03";
$newDate = date("Y-m-d", strtotime($originalDate));
echo $newDate ;
?>
I get an output like
2014-03-01
When i convert the date "2014-Mar-03"
<?php
$originalDate = "2014-Mar-03";
$newDate = date("Y-m-d", strtotime($originalDate));
echo $newDate ;
?>
I get ouput like
2014-03-03
Why the first one does not give the correct result?