Alex Rivera | Logout

mysql timediff to hours

Asked 2010-02-01T00:41:31.923
54

I'm Trying to get the timediff from my table and convert it to hours (it's for an hourly billed service)

SELECT TIME_TO_SEC(TIMEDIFF(endDate,startDate))/3600 FROM tasks >

where endDate and startDate are in datetime format

is there another way (more efficient) to do this task? Thanks !

Edit
Report

1 Answer

0
TIMEDIFF(endDate, startDate) / 10000
answered 2010-02-01T01:54:09.137

Your Answer