Converts a string to a DateTime and returns the result. If the conversion fails the default DateTime is returned, i.e, 0001-01-01 00:00:00.
DateTime Date(string dateTime; [string format])
dateTime |
A string representing a date and optionally a time. |
format |
Optional format definition for the string to convert. |
Example
Date("31/12/2023";"dd/MM/yyyy")
Returns the date time value of 2023-12-31 00:00:00.