$date = 21/10/2015
And I want the date in 2015-10-21
(y-m-d
) format.
I tried:
$date = date("Y-m-d", strtotime($date));
But it only works for dates less than 12.
$date = 21/10/2015
And I want the date in 2015-10-21
(y-m-d
) format.
I tried:
$date = date("Y-m-d", strtotime($date));
But it only works for dates less than 12.