Functions

DATESTR

Returns the date value of a DateTime as a string representation in either a standard or defined format.

Syntax

string DATESTR(DateTime? value)

or

string DATESTR(DateTime? value, string format)

Example

For further explanation into the format of DateTime please follow the link to the Microsoft page on Custom Date and Time Format Strings

The syntax without the specified formatting is based upon your local settings i.e. in this example it is based upon UK settings.

DATESTR(DATEVALUE("2017-10-09"))

Will return '09/10/2017'.

or

DATESTR(DATEVALUE("2017-10-09 02:22"), "MM.dd.YYYY HH:mm")

Will return '10.09.2017 02:22'.