Skip to main content
Version: V1.0.0

TIMEDIFF

Declaration

TIMEDIFF(date1, date2)

Description

Returns the time interval between two datetime values as a TIME type.

Example

SELECT
TIMEDIFF('2015-06-06 12:12:12', '2014-06-05 11:11:11'),
TIMEDIFF('2015-06-06 12:12:12', '2015-06-05 11:11:11')
\G
*************************** 1. row ***************************
TIMEDIFF('2015-06-06 12:12:12', '2014-06-05 11:11:11'): 838:59:59
TIMEDIFF('2015-06-06 12:12:12', '2015-06-05 11:11:11'): 25:01:01
1 row in set (0.001 sec)