MySQL subtime()函數
SUBTIME(expr1,expr2)
SUBTIME()返回expr1。expr2表示的值和格式expr1相同。expr1是一個時間或日期時間表達式, expr2是一個時間。
mysql> SELECT SUBTIME('1997-12-31 23:59:59.999999', -> '1 1:1:1.000002'); +---------------------------------------------------------+ | SUBTIME('1997-12-31 23:59:59.999999'... | +---------------------------------------------------------+ | 1997-12-30 22:58:58.999997 | +---------------------------------------------------------+ 1 row in set (0.00 sec)