I'm using MySQL version 5.5.25a
I need to get the total time difference from startTime and endTime
So if I have
startTime = 14:00
endTime = 15:30
I need the result to show as 1.5
I believe I am on the right track just not sure how to show the result as I need it...
The fields are TIMESTAMP
Code:SELECT TIME_FORMAT(SEC_TO_TIME(UNIX_TIMESTAMP(endTime) - UNIX_TIMESTAMP(startTime)), '%H.%i') AS totalTime FROM table
Right now my result would be 01.30
Thanks



Reply With Quote




Bookmarks