网站建设资讯

NEWS

网站建设资讯

mysql日期相差datediff函数

#日期相差:datadiff,两个参数为时间类型
SELECT DATEDIFF('2019-2-28','2019-2-2');
SELECT DATEDIFF(MAX(hiredate),MIN(hiredate)) AS difference FROM employees;
SELECT DATEDIFF(NOW(),'2012-12-2') ;

当前文章:mysql日期相差datediff函数
URL地址:http://njwzjz.com/article/ijgcci.html