DateTimeValue

Mon 01 January 2018

Syntax

DateTimeValue(textdatetime)

Description

Use the DateTimeValue function to derive a DateTime value from a string representing a date and time.

Parameters

Field or Control

Definition

textdatetime

Specify a date/time value represented as text in one of three formats:

  • MM / DD / YY [ YY ] hh : mm : ss.ssssss [{ AM | PM }]

  • MM . DD . YY [ YY ] hh : mm : ss.ssssss [{ AM | PM }]

  • YYYY - MM - DD T hh : mm : ss [ . S ] TZD (that is, ISO 8601 format—for example, 1999-01-01T19:20:30.000000+0800)

In which:

  • YY [ YY ] is a two- or four-digit year.

  • 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).

  • ssssss is six digits of milliseconds.

  • 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.