Possible Duplicate:
get difference in time in HH:MM format php
my time format is d/m/Y - h:ia
example output is 21/10/2012 - 03:49pm
I'm using this code to calculate the difference between $from and $to
$to = strtotime("21/10/2012 - 10:30pm");
$from = strtotime("22/10/2012 - 8:30am");
$stat = date("H\h:i\m", abs($to - $from));
but I'm alwys getting an incorrect value
for the example above I got an output of 16h:00m but it should be 10h:00m
is there a much more efficient and effective way to do this?