ToDateTime

Converts value to datetime type

ToDateTime("01 05 2022 10:00",DateTimeFormatTemplateOption.`MM*dd*yyyy HH:mm`) → 2022-01-05 10:00:00.000
ToDateTime("31 Dec 23:59:59",DateTimeFormatTemplateOption.`dd*shortMonth HH:mm:ss`) → 0000-12-31 23:59:59.000

Inputs

ToDateTime(value, format, [location], [replaceInvalidWith])

  • value - A value to convert into dateTime

  • format - Enum ‘DateFormatTemplateOption’ with the corresponding format of the value, ex. DateTimeFormatTemplateOption.MM*dd*yyyy HH:mm

  • [location] - [optional: UTC by default**]**

  • [replaceInvalidWith] - [optional: null by default**]** - invalid values will be replaced with this parameter

Description

You have to select the value's actual (not output) format in the second parameter.