date_time_now

The date_time_now function gets the current date and time in the specified IDOL date format.

Syntax

date_time_now( format, gmt )

Arguments

Argument Description
format (string) An IDOL date format string that specifies the format of the returned string.
gmt

(boolean, default false) Specifies whether to return the current time in GMT rather than local time.

NOTE: The time zone values (ZZZ and ZZZZZ) in the format string always refer to the local time zone. If you set this argument to true, OpenText recommends omitting these from the format string.

Returns

String. The current date and time.

Examples

--Return value in local time
print (date_time_now("YYYY-MM-DD HH:NN:SS ZZZ"))

--Return value in GMT
print (date_time_now("YYYY-MM-DD HH:NN:SS", true))