Date and time formatting
Date and time values are often used in document and email templates. You can customize the formatting so a date is displayed as 22/08/2018 instead of 22 August 2018.
A date or time is typically inserted with a merge field code, like «AppDate» or «AppTime» (or something similar).
Formatting in Word templates
You can customize the formatting of a date or time by changing the merge field. Add a backslash (\), immediately followed by the relevant formatting instruction.
For example. «AppDate» formats to 22 August 2018, but «AppDate \dd/MM/yyyy» will format to 22/08/2018. This is achieved by the addition of \dd/MM/yyyy.
You can find more information on updating merge fields in document templates through the links below:
Managing document templates
Merge fields in Word for Mac
Merge fields in Word for Windows
Formatting in email templates
To customize the appearance of date and time fields in your email templates (you can access it via Template Settings > Email templates), you need to add a backslash (\) followed by the relevant code in the merge field.
Available formatting instructions
Code | Description |
d | Represents the day of the month as a number from 1 through 31. A single-digit day is formatted without a leading zero |
dd | Represents the day of the month as a number from 01 through 31. A single-digit day is formatted with a leading zero |
ddd | Represents the abbreviated name of the day of the week (Mon, Tues, Wed etc) |
dddd | Represents the full name of the day of the week (Monday, Tuesday etc) |
M | Month number |
MM | Month number with leading zero |
MMM | Abbreviated Month Name (e.g. Dec) |
MMMM | Full month name (e.g. December) |
yy | Year, leading zero (e.g. 2018 would be 18) |
yyyy | Year, (e.g. 2018 would be 2018) |
h | 12-hour clock hour (e.g. 7) |
hh | 12-hour clock, with a leading 0 (e.g. 07) |
H | 24-hour clock hour (e.g. 19) |
HH | 24-hour clock hour, with a leading 0 (e.g. 19) |
m | Minutes |
mm | Minutes with a leading zero |
tt | AM / PM (e.g. AM or PM) |
' | Represents a quoted string (apostrophe). Displays the literal value of any string between two apostrophe (') characters (e.g. 'de' will be formatted to de) |
Examples
Code formatting | Displayed as |
MM/dd/yyyy | 08/22/2018 |
dd/MM/yyyy | 22/08/2018 |
dd.MM.yyyy | 22.08.2018 |
dd-MM-yyyy | 22-08-2018 |
dd MMMM yyyy | 22 August 2018 |
MMMM dd, yyyy | August 22, 2018 |
dddd, dd MMMM yyyy | Wednesday, 22 August 2018 |
ddd, dd MMMM yyyy | Wed, 22 August 2018 |
ddd, dd MMM yyyy | Wed, 22 Aug 2018 |
ddd, dd MMM yyyy | Wed, 22 Aug 2018 |
HH:mm | 06:30 |
hh:mm tt | 06:30 AM |
H:mm | 6:30 |
h:mm tt | 6:30 AM |