I've tried searching everywhere to find a solution for this but nothing I'm trying is working.
I have a date/time string in a 12 hour UK format:
20-07-2017 04:45 PM
I'm trying to convert that into the following 24 hour clock:
Y-m-d H:i:00
And here's the PHP I was trying to get to work...
$start_date = $_POST['startdate'];
$newstartdate = new DateTime($start_date);
$start_date = $newstartdate->format('Y-m-d H:i:00') ;
Am I misusing this? Should I be taking a completely diferent approach?