I am trying to get and display the difference of 2 times.
First time is a database query from a field type of "time"
The data entered into that field is CURTIME()
We'll call that query $start_time
It echos in the format of 00:00:00 ("H:i:s")
The second time is the current time when the page loads.
It is gotten from a query
$gettime= db_query( "select curtime()" );
$cur_time= db_result($gettime,0,0);
That query will also echo in the same format
The problem I have is getting the difference between the 2 down to the second, so that if $start_time = 00:00:30 and $cur_time = 01:00:00, it will say that difference ($diff) = 00:59:30. And then some way to put in plain english that this means 59 minutes and 30 seconds have passed.
I tried subtracting the 2, converting to all seconds, then subtracting, but I just can't seem to get it to work. Thanks for the help.