"Character to DateTime" converts a literal DateTime string to a DateTime (DT) value.

Syntax

CTODT(<expC>)

<expC>

The character expression, in the current DateTime format, to return as a DateTime value.

Description

Use CTODT( ) to convert a DateTime string to a DateTime value. DateTime values are their own type (DT).

SET DATE determines the order of the day, month, and year.

SET CENTURY determines whether the year is expressed as two or four digits.

SET MARK assigns the separator character.

SET HOURS determines whether times are displayed in military format, or with an AM/PM indicator.