Learn about date formats in templates

Format codes

Select the required date format from the list below.

Date format code Date component Example
d day of month (without leading zero) 3
dd day of month (with leading zero) 03
ddd day of week (three letters) Tue
dddd day of week (full) Tuesday
M month (numeric, without leading zero) 1
MM month (numeric, with leading zero) 01
MMM month (three letters) Jan
MMMM month (full) January
yy year (two digits) 12
yyyy year (four digits) 2012
th day of the month suffix st, nd, rd, or th

Examples for the date 1 April 2012

You can use other symbol for additional format. Commonly used symbols for separating date components are / (forward slash) and - (hyphen). The examples below show some common formatting options.

Format code Report Output
dd/MM/yy 01/04/12
ddd, dd-MMM-yyyy Sun, 01-Apr-2012
dddd, dth MMMM yyyy Sunday, 1st April 2012