This question already has an answer here:
- Convert one date format into another in PHP 15 answers
I have a date i.e, 12-20-14(mm-dd-yy) want to convert 2014-12-20(yyyy-mm-dd)
I try
$date='12-20-14';
echo date('Y-m-d',strtotime($date));// Output :- 1970-01-01
</div>