Functions

DATEVALUE

Converts a string to a DateTime object.

Syntax

DateTime? DATEVALUE(string value)

or

DateTime? DATEVALUE(string value, string format)

Example

DATEVALUE("25-JAN-2017")

Returns a DateTime of "25/01/2017 00:00"

or

DATEVALUE("20170125", "yyyyMMdd")

Returns a DateTime of "25/01/2017 00:00"

or

Used within other expressions:

DATEDIFF("month", DATEVALUE("2016-05-02"), DATEVALUE("2017-02-25"))

Will return '9' as there are nine months between the two dates.

or

DATESTR(DATEVALUE("2017-10-09"), "dd/MM/YYYY")

Will return '09/10/2017'.