MySQL Forums
Forum List  »  General

Time Value Substraction
Posted by: Manny Otero
Date: August 28, 2015 09:23AM

I have this query...

SELECT MAX( finish_time )
,MIN( start_time )
,SEC_TO_TIME( MAX( finish_time ) - MIN( start_time ) )
FROM time_table;

These are the results...

max(finish_time): 2015-08-28 09:52:50
min(start_time): 2015-08-28 09:01:07
sec_to_time(max(finish_time) - min(start_time)): 01:25:43

The final column should have a time value of 51:43. Why am I getting 1:25:43?

Thanks!

Options: ReplyQuote


Subject
Written By
Posted
Time Value Substraction
August 28, 2015 09:23AM
August 29, 2015 09:33AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.