humbleprogrammer
Programmer
Hello,
I would like to display how many hours have elapsed between 2 times. The times are stored in the MySQL database as time data types. I have been able to calculate the difference in seconds but haven't had any luck converting that to hours. Below is what I am currently using:
$time_difference = (gmmktime($start_time)-gmmktime($end_time));
For a start time of 12:00:00 and a end time of 05:00:00 this is returning 25200. How can I convert this into hours so it would display 5?
Thanks in advance!
I would like to display how many hours have elapsed between 2 times. The times are stored in the MySQL database as time data types. I have been able to calculate the difference in seconds but haven't had any luck converting that to hours. Below is what I am currently using:
$time_difference = (gmmktime($start_time)-gmmktime($end_time));
For a start time of 12:00:00 and a end time of 05:00:00 this is returning 25200. How can I convert this into hours so it would display 5?
Thanks in advance!