The title might be a bit confusing so allow me to explain. I\'m using a table to record my work logs. Every day I\'ll create an entry stating from what time to what time I h
First calculating the days difference then multiply it with 24*60*60 to convert it into seconds then add to it time_to_sec value result
DATEDIFF(start_date,end_date)*24*60*60 + TIME_TO_SEC(TIMEDIFF(TIME(start_date),TIME(end_date)))
AS sec_diff
For more details check codebucket- Surpassing time_to_sec() function maximum limit