1.利用To_Days函数; select to_days(now())-to_days('时间字段') ; 2.利用DateDiff函数; select datediff(now(),'时间字段') ; 案例: 参数1-参数2等于间隔天数 select (datediff(curdate(), date(colunm_name1))- (select colunm_name2 from table_name2)) as o from table_name1 ; 来源:https://www.cnblogs.com/lrzb/p/11805134.html 标签 select mysql时间函数 mysql日期函数 mysql