TIMEDIFF

2024-12-02 03:48:26  Updated

Syntax

TIMEDIFF(date1, date2)

Purpose

TIMEDIFF() returns the interval between two date and time values of the TIME data type.

Examples

obclient> 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

Contact Us