I am trying to substract 24 hours time format and then convert it into minutes but it does not work well.
Here is my code
$time1 = '2010-08-05 23:00:00';
$time2 = '2010-08-05 00:00:00';
echo round( (strtotime($time2) - strtotime($time1)) / 60);
it will display this -1380.
if you put 1-23 hour in time2 it will work. I tried to convert time in 12 hours but it didn't work.
Any help would be greatly appreciated.
The result is in minutes not in hours.