DATE_DIFF() 用于计算两个日期之间的间隔天数
mysql> SELECT DATEDIFF(‘2017-12-31‘, ‘2010-12-31‘); +--------------------------------------+ | DATEDIFF(‘2017-12-31‘, ‘2010-12-31‘) | +--------------------------------------+ | 2557 | +--------------------------------------+
时间: 2025-01-03 18:55:24