认识一下 DATEDIFF 函数,可以计算两者的日期差 DATEDIFF(‘2007-12-31’,‘2007-12-30’); # 1 DATEDIFF(‘2010-12-30’,‘2010-12-31’); # -1