SUB_TIMESTAMP

ScriptEigener Objekttyp in der Automation Engine function: Subtracts time from a time stamp

Syntax

SUB_TIMESTAMP (Time Stamp,Time)

Syntax

Description/Format

Time stamp

Time stamp from date and time ("YYYY-MM-DD HH:MM:SS").
Format: script literal or script variable

Time

Time ("HH:MM:SS") to be subtracted from a time stamp.
Format: script literal or script variable

Allowed values: 0 to 99 (for each HH, MM and TT)


Return code

Time stamp in the "YYYY-MM-DD HH:MM:SS" format

Comments

This script function subtracts time in the "HH:MM:SS" format from a given time stamp in the "YYYY-MM-DD HH:MM:SS" format.

In doing so, UTC is used for calculation. This means that Daylight Time and Standard Time are not considered. A maximum value of 99 is allowed for hours, minutes and seconds, so the script function's result can lie a bit more than 4 days before the original time stamp.

Example

In the following example, one second is subtracted from the time stamp. The result "2003-12-31 23:59:59" is written to the activation protocol.

:SET &RET# = SUB_TIMESTAMP("2004-01-01 00:00:00", "00:00:01")
:
PRINT &RET#

See also:

Script Elements - Date and Time

Date, Time and Period Formats

About Scripts
Script Elements - Alphabetical Listing
Script Elements
- Ordered By Function