Declaration
DATEDIFF(date1, date2)
Description
Returns the number of days between date1 and date2.
Only the date part of the parameter is used in the calculation, and the time part is ignored.
Examples
obclient> SELECT DATEDIFF('2015-06-19','1994-12-17');
+-------------------------------------+
| DATEDIFF('2015-06-19','1994-12-17') |
+-------------------------------------+
| 7489 |
+-------------------------------------+
1 row in set