skip to main content
Corticon Studio: Rule Language Guide : Rule operator details and examples : To dateTime: Casting a string to a dateTime
 

Try Corticon Now

To dateTime: Casting a string to a dateTime

SYNTAX

<String>.toDateTime

DESCRIPTION

Converts the value in <String> to data type DateTime ONLY if all characters in <String> correspond to a valid Date, Time, or DateTime mask (format). For complete details on DateTime masks, see Rule Modeling Guide.

USAGE RESTRICTIONS

The Operators row of the table in Summary Table of Vocabulary Usage Restriction applies. No special exceptions.

RULESHEET EXAMPLE

The following Rulesheet uses .toDateTime to convert string1 to type DateTime and assign the value to dateTime1.

SAMPLE TEST