Script function: Provides current date and time
SYS_TIMESTAMP_PHYSICAL([TimeZone])
|
Syntax |
Description/Format |
|---|---|
|
TimeZone |
Name of a TimeZone object or keyword UTC |
|
Return code |
|---|
|
Current date and time in the format "JJJJ-MM-TT HH:MM:SS" |
If the script function is called up without a parameter, or if the keyword UTC is used, date and time are returned in UTC (Coordinated Universal Time).
The following example determines the current date and time in Sydney. The name of a TimeZone object is entered as a parameter, having been defined for the Australian Eastern Standard Time. The script function's return value is written to the activation protocol.
:SET &NOW# = SYS_TIMESTAMP_PHYSICAL("TZ.SYD")
:PRINT &NOW#
See also:
| Script element | Description |
|---|---|
| SYS_TIME | Returns the current time of day at the beginning of the script processing. |
| SYS_TIME_PHYSICAL | Determines the current time of day. |
Script Elements - Date and Time
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered By Function