date

Use the date function to convert a number into its date notation.

The date produced by this function is localized based on the active output language.

 date ( number )

This function returns a value of type TEXT.

The function has one parameter:

  • number, type NUMBER. The date to be converted. Fractions are ignored.

number is interpreted as a calendar date in ISO 8601 YYYYMMDD format.

For compatibility with legacy data sources, years between 0 and 99 are interpreted as years in the 1900s (1900-1999). Years between 100 and 199 are interpreted as years in the 2000s (2000-2099). The text "????" is returned for invalid dates.

Examples

date (20150302) results in "2 March 2015"

date (20150302) results in "March 2, 2015" (output language ENU)

date (20150302) results in "le 2 mars 2015" (output language FRA)

date (150302) results in "2 March 1915"

date (1150302) results in "2 March 2015"

date (0) results in "????"

date (20150229) results in "????"

The date is formatted in the default language if an output language is not specified.