DateTimeToISO

Mon 01 January 2018

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

Field or Control

Definition

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:

  • YYYY is a four-digit year.

  • MM is a two-digit month (01 through 12).

  • DD is a two-digit day of the month (01 through 31).

  • hh is a two digits of hour (00 through 23).

  • mm is a two digits of minute (00 through 59).

  • ss is two digits of second (00 through 59).

  • S is milliseconds in one or up to six digits.

  • TZD is a time zone designator ( Z , + / - hh : mm or + / - hhmm ).

Returns

Returns a DateTime value in ISO 8601 format.