Afaf Afaf - 3 months ago 22
PHP Question

Php how to convert date from 12h to 24h format

In that script I get as a result 11/01/2017 12:00:01 so the result I want to get is : 11/01/2017 00:00:01

$time1 = strtotime("1/".$value['date_operation']."00:00:01");
$newformat1 = date('d/m/Y h:i:s',$time1);
echo $newformat1."this is the day formated";

sg- sg-
$newformat1 = date('d/m/Y H:i:s',$time1);

Note the upper case "H"