Skip to content
Shaun Lawrence edited this page Nov 4, 2020 · 3 revisions

Converts and returns the parameter as a DateTime.

Date(value)

or

Date(value, format)

Parameters

value

The object to convert to a DateTime.

Type object (basically anything that can be converted to a DateTime.
Required Yes

format

The format to use when converting the first parameter (expecting a string) to a DateTime.

Type string
Required No

Examples

Date("25/12/2020")

Converts the string to a DateTime.

Date("12/25/2020", "MM/dd/yyyy")

Converts the string to a DateTime using the supplied format.

Clone this wiki locally