SYS_TIMESTAMP_PHYSICAL
Use the SYS_TIMESTAMP_PHYSICAL script function to retrieve the current date and time in YYYY-MM-DD HH:MM:SS format. You can optionally specify a time zone.
Syntax
SYS_TIMESTAMP_PHYSICAL ([Time Zone|UTC])
Parameters
| Parameter | Description | Format | Allowed Values | Default Value |
|---|---|---|---|---|
| Time Zone or UTC (Optional) |
Specifies the time zone for the date. | script literal or script variable |
Name of a Time Zone object. UTC — Returns the time in UTC (Coordinated Universal Time) |
UTC |
Examples
The following example determines the current date and time in Sydney. The script function uses a Time Zone object called TZ.SYD which is configured for Australian Eastern Standard Time. The retrieved timestamp is printed in the activation report.
: SET &NOW# = SYS_TIMESTAMP_PHYSICAL ("TZ.SYD" )
: PRINT &NOW#