<< back to sysax.com Product page

13.1. Creating a timestamp

The GetTimestamp method can be used to generate a timestamp in YYYYMMDDhhmmss format (Y=year, M=month, D=day, h=hour, m=minute, s=second). The keywords "incr" and "decr" can be used to generate timestamps for previous or future dates. The 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 13.1. IDL Definition of method to creating a timestamp



HRESULT GetTimestamp ([in, defaultvalue("")] BSTR b_incrdecr, [in, defaultvalue("")] BSTR b_intervalname, [in, defaultvalue(0)] UINT n_intervalcount, [out, retval, defaultvalue(NULL)] BSTR *b_timestampout);


Exhibit 13.2. Example usage of method to creating a timestamp (VBScript)


Dim ts
ts = app.GetTimestamp "incr", "day", 2