DateTimeToISO function
Syntax
DateTimeToISO(textdatetime)
Description
Use the DatetimeToISO function to convert the text value textdatetime (as a base time zone time) to a DateTime value in ISO 8601 format. This function automatically calculates whether daylight saving time is in effect for the given textdatetime.
The system’s base time zone is specified in the PSOPTIONS table.
Parameters
| Parameter | Description |
|---|---|
|
textdatetime |
Specify a date/time represented as text in the ISO 8601 format: YYYY - MM - DD T hh : mm : ss[. S] (for example, 1999-01-01T19:20:30.000000) In which:
|
Returns
Returns a DateTime value in ISO 8601 format.
Example
In the following example, assuming the base time (as defined in PSOPTIONS) is PST, &DATETIME would have a DateTime value of "1999-01-01T01:00:00.000000-08:00":
&DATETIME= DateTimeToISO("1999-01-01 01:00:00.000000");