| << 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.
The syntax is
Exhibit 8.1. table title
gettimestamp <user variable> [, optional: <keywords: incr, decr>, <keywords: second, minute, hour, day, week, month, year>, <interval count>]; |
Some examples are
Exhibit 8.2. table title
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 |