When using the dateformat Function in a Calculation,
you can use any of the following to format the date exactly as you would like it displayed.
The default, if no format is specified, is "l jS F Y" - see examples below.
| Character | Description | Example returned values |
| DAY | | |
| d |
Day of the month, 2 digits with leading zeros |
01 to 31 |
| D |
A textual representation of a day, three letters |
Mon through Sun |
| j |
Day of the month without leading zeros |
1 to 31 |
| l (lowercase 'L') |
A full textual representation of the day of the week |
Sunday through Saturday |
| S |
English ordinal suffix for the day of the month, 2 characters |
st, nd, rd or
th. Works well with j
|
| WEEK |
|
|
| W |
ISO-8601 week number of year, weeks starting on Monday |
Example: 42 (the 42nd week in the year) |
| MONTH |
|
|
| F |
A full textual representation of a month, such as January or March |
January through December |
| m |
Numeric representation of a month, with leading zeros |
01 through 12 |
| M |
A short textual representation of a month, three letters |
Jan through Dec |
| n |
Numeric representation of a month, without leading zeros |
1 through 12 |
| YEAR |
|
|
| Y |
A full numeric representation of a year, 4 digits |
Examples: 1999 or 2003 |
| y |
A two digit representation of a year |
Examples: 99 or 03 |
Examples
| Calculation | Result |
| dateformat(today()) | Saturday 6th December 2025 |
| dateformat(today(), "l jS F Y") | Saturday 6th December 2025 |
| dateformat(today(), "l F jS, Y") | Saturday December 6th, 2025 |
| dateformat(today(), "M Y") | Dec 2025 |
| dateformat(today(), "M-y") | Dec-25 |
| dateformat(today(), "F jS, Y") | December 6th, 2025 |
| dateformat(today(), "d-m-y") | 06-12-25 |
| dateformat(today(), "Y-m-d") | 2025-12-06 |