Function documentationADDTIME/SUBTIME(t,a) Locate this document in the navigation structure

 

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

Value t: When used in a function, the expression t (time_or_timestamp_expression) must supply a time, a time stamp value, or an alphanumeric value that matches the current time or time stamp format.

Value a: When used in a function, the expression a (time_expression) must supply a time value or an alphanumeric value that matches the current time format.

ADDTIME(t,s)/SUBTIME(t,a)

t, a

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

Addition of a to t or subtraction of a from t

Time or time stamp value

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

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

t or a is a NULL value

NULL value