ADDTIME/SUBTIME(t,a) 

ADDTIME(t,a) and SUBTIME(t,a) are time functions that calculate a time/timestamp value in the past or future.

t: time or timestamp expression
a:
time expression

 

Result of the ADDTIME(t,a)/SUBTIME(t,a) function

Addition of a to t/
subtraction of a from t

Time value or time stamp value

SUBTIME(t,a) and t and a are time values

a must be less than t, otherwise an error is output

t or a is NULL value

NULL value (see data type)