strtotime was not working in php with m-d-Y format in php?

Viewed 1160

i have m-d-Y date format but i want Y-m-d format using strtotime, but it doesn't work?

$date_time = '05-23-2017 01:00';
echo date('Y-m-d H:i:s', strtotime($date_time));

but it will give output "1970-01-01 01:00:00" instead of "2017-05-23 01:00:00"

1 Answers
Related