Skip to main content
Version: V1.2.0

DATEDIFF

Syntax​

DATEDIFF(date1, date2)

Description​

Returns the number of days between date1 and date2.

Only the date parts of the parameters are used in the calculation, and the time parts are ignored.

Examples​

SELECT DATEDIFF('2015-06-19','1994-12-17');
+-------------------------------------+
| DATEDIFF('2015-06-19','1994-12-17') |
+-------------------------------------+
| 7489 |
+-------------------------------------+
1 row in set (0.001 sec)