计算时间间隔
day
datediff(大日期, 小日期)
SELECT datediff('2009-07-31', '2009-07-30')
month, year, second
timestampdiff(month, 小日期,大日期)
SELECT timestampdiff(year,'2005-07-31', '2009-07-30')
标签:07,datediff,30,year,日期,时间,sql,2009,函数
From: https://www.cnblogs.com/tian1022/p/17187494.html