ToDate

Converts value to date type

ToDate("Jan 20 23",DateFormatTemplateOption.`shortMonth*dd*yy`) → 2023-01-20
ToDate("10 November",DateFormatTemplateOption.`dd*month`) → 1-11-10

Inputs

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

  • value - A value to convert into a date

  • format - Enum ‘DateFormatTemplateOption’ with the corresponding format of the value, ex. DateFormatTemplateOption.dd*month

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

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

Description

This function can also convert the DateTime value to Date (truncates Time part).

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