ADD_TIMESTAMP

Use the ADD_TIMESTAMP script function to add time to a timestamp. The function lets you add up to 99 hours, minutes, and seconds to the timestamp, so the result can be just over 4 days after the original timestamp.

Note: ADD_TIMESTAMP uses UTC for the calculation, and does not consider Daylight Time or Standard Time.

Tip: Use ADD_DAYS to add whole days to a date.

Syntax

ADD_TIMESTAMP (Timestamp,Time)

Parameters

Return Code

The script function returns a timestamp in YYY-DD-MM HH:MM:SS format.


Example

The following example adds 24 hours and one second to a timestamp, and prints the result (2019-01-01 00:00:01) in the activation report.

:SET &RET# = ADD_TIMESTAMP("2018-12-31 00:00:00", "24:00:01")
:
PRINT &RET#

See also:

seealso

Script Date and Time Functions

Date, Time and Period Formats in Scripts