将正常日期转换为MySQL日期格式[重复]

This question already has an answer here:

I have a date in this format:

"23/02/2017 6:14:30"

How can I convert it to default MySQL format?

2017-02-23 06:14:30

Here's what I've tried but it didn't work.

$date = "23/02/2017 6:14:30";

$date_new = date( 'Y-m-d H:i:s', strtotime( $date ) );

echo $date_new; // outputs: 1969-12-31 21:00:00
</div>
$newdate = substr($date,6,4) . '-' . substr($date,3,2) . '-' . substr($date,0,2) . substr($date,10);