days_diff
Description
Syntax:
INT days_diff(DATETIME enddate, DATETIME startdate)
This function calculate the number of days between the startdate to the enddate.
Example
mysql> select days_diff('2020-12-25 22:00:00','2020-12-24 22:00:00');
+---------------------------------------------------------+
| days_diff('2020-12-25 22:00:00', '2020-12-24 22:00:00') |
+---------------------------------------------------------+
| 1 |
+---------------------------------------------------------+
Keywords
days_diff