Топ-100
 
CerebroSQL

SUBTIME

База данных: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

Topic

Syntax:
SUBTIME(expr1,expr2)

SUBTIME() returns expr1 ? expr2 expressed as a value in the same
format as expr1. expr1 is a time or datetime expression, and expr2 is a
time expression.

URL: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html

Example

mysql> SELECT SUBTIME('2007-12-31 23:59:59.999999','1 1:1:1.000002');
-> '2007-12-30 22:58:58.999997'
mysql> SELECT SUBTIME('01:00:00.999999', '02:00:00.999998');
-> '-00:59:59.999999'