Afaf Afaf - 1 month ago 7
PHP Question

Php 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-
Answer
$newformat1 = date('d/m/Y H:i:s',$time1);

Note the upper case "H"

Comments