mysql (时间)日期相减取天数

来源:互联网 发布:surface 无网络 编辑:程序博客网 时间:2024/05/17 08:58

 maysql:

 

select TO_DAYS(str_to_date('12/1/2001 12:00:00 AM','%m/%d/%Y')) -
TO_DAYS(str_to_date('11/28/2001 12:00:00 AM','%m/%d/%Y'))  as a