Date.ToText

Syntax

Date.ToText(date as nullable date, optional format as nullable text, optional culture as nullable text) as nullable text

About

Returns a textual representation of date. An optional format may be provided to customize the formatting of the text. An optional culture may also be provided (for example, "en-US").

Example 1

Get a textual representation of #date(2010, 12, 31).

Date.ToText(#date(2010, 12, 31))

"12/31/2010"

Example 2

Get a textual representation of #date(2010, 12, 31) with format option.

Date.ToText(#date(2010, 12, 31), "yyyy/MM/dd")

"2010/12/31"