FORMAT_DATE¶
Description¶
FORMAT_DATE formats a given date, from either an information or a text in ISO8601 format,
into the specified format.
There might be two documents that ask for a different date format, e.g.
28.02.2022 vs.
02-28-2022.
The given format can contain the following options:
| Option | Description |
|---|---|
D |
Days without leading zero, e.g. 7 or 13 |
DD |
Days with leading zero, e.g. 07 or 13 |
M |
Months without leading zero, e.g. 2 or 11 |
MM |
Months with leading zero, e.g. 02 or 11 |
MMM |
Short month name, e.g. Mar |
MMMM |
Full month name, e.g. March |
YYYY |
The year, e.g. 1987 or 2021 |
The month has to be written in capitals.
A lowercase mm means minutes, which a date does not carry, so FORMAT_DATE('2024-03-05', 'dd.mm.yyyy') returns
05.00.2024 rather than the month.
Days and years are not case sensitive, so dd and yyyy give the same result as DD and YYYY.
FORMAT_DATE accepts the time tokens listed under FORMAT_DATETIME as well, and the two
operators are interchangeable.
Example: German Format¶
This returns 28.02.2022.
Example: US Format¶
This returns 02-28-2022.