days_diff
description
Syntax
INT days_diff(DATETIME enddate, DATETIME startdate)
开始时间到结束时间相差几天
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