首页 > 代码库 > SUBTIME()

SUBTIME()

SUBTIME() 用于对日期进行减运算,格式为 SUBTIME(date, expr)

mysql> SELECT SUBTIME(2000-12-31 23:59:59, 1:1:1);    # 给指定的日期减去1时1分1秒+-----------------------------------------+| SUBTIME(2000-12-31 23:59:59, 1:1:1) |+-----------------------------------------+| 2000-12-31 22:58:58                     |+-----------------------------------------+

 

 

 

 

    

SUBTIME()