skip to main content
Corticon Studio: Rule Language Guide : Rule operator details and examples : To dateTime: Timezone offset
 

Try Corticon Now

To dateTime: Timezone offset

SYNTAX

<Date>.toDateTime(<String>)

DESCRIPTION

Converts the value in <Date> to data type DateTime ONLY if all characters in <Date> correspond to a valid DateTime mask (format). The date portion is the same as the <Date> value and the time portion is set to 00:00:00 in the timezone specified by <String>, which is the timeZoneOffset. The timeZoneOffset must take the form of a valid timezone offset such as ‘-08:00’, ‘+03:30’, ‘01:45’

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 dateOnly1 to type DateTime and assign the value to dateTime1, with a timezone offset of -5.

SAMPLE TEST