newphpbees
29 Jan 2012, 10:33 PM
I have two textboxes that inputted time, and I want to get the difference between two time.
for example:
$IN = 13:35;
$OUT = 17:35;
$OTHours = ($OUT - $IN);
$OTHours = 4.00;
and it is correct, but I have a scenario like this:
$IN = 21:35;
$OUT = 05:35;
$OTHours = -16.00;
it should be 8.00.
Any help is highly appreciated.
Thank you..
for example:
$IN = 13:35;
$OUT = 17:35;
$OTHours = ($OUT - $IN);
$OTHours = 4.00;
and it is correct, but I have a scenario like this:
$IN = 21:35;
$OUT = 05:35;
$OTHours = -16.00;
it should be 8.00.
Any help is highly appreciated.
Thank you..