i have 2 type of time values are 2015-09-25 11:52:22 and 2015-09-25 01:06:57. i using date different function in php. my code as
$date_a = new DateTime($from_time);
$date_b = new DateTime($to_time);
$interval = date_diff($date_a,$date_b);
echo $interval->format('%h:%i:%s');
Out put gives 10:45:25.how can calculated time diff??
2015-09-25 11:52:22 is AM and 2015-09-25 01:06:57 is PM that time only i got look like otherwise coming correct