How to convert M d, D
= Jan 17, Tue
to Y-m-d
= 2017-01-17
in PHP?
Asked
Active
Viewed 52 times
3 Answers
3
$date = DateTime::createFromFormat('d/m/Y', "17/01/2017");
echo $date->format('Y-m-d');
Source - http://www.php.net/manual/en/datetime.createfromformat.php
Hope this helps...

Prakash
- 335
- 3
- 8