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