<< back to sysax.com Product page |
The gettimestamp command is used to generate the current timestamp in YYYYMMDDhhmmss format (Y=year, M=month, D=day, h=hour, m=minute, s=second). The generated timestamp is copied to the user variable. The predefined keywords incr and decr can be optionally used to generate timestamps for previous or future dates. The predefined keywords second, minute, hour, day, week, month, and year are used to specify the time interval to adjust, while the interval count specifies the number of such intervals.
Exhibit 14.1. Syntax of command for generating timestamps
gettimestamp <user variable> [, optional: <keywords: incr, decr>, <keywords: second, minute, hour, day, week, month, year>, <interval count>]; |
Exhibit 14.2. Examples for using the command for generating timestamps
gettimestamp ~my_timestamp; #get current timestamp gettimestamp ~my_timestamp, decr, month, 2; #get a timestamp that is 2 months old gettimestamp ~my_timestamp, incr, day, 5; #get a timestamp that is 5 days in the future |