When building a merge template, you can change the format in which a date or number merge field will display data.
Change the Format of a Date Field
Open the merge template document in Word and press Alt+F9 (for a PC) or Option+F9 (for a Mac) to reveal the merge field codes. Locate the date field for which you'd like to change the format. After the current merge field text, enter " \@ " followed by the desired display format in quotation marks.
- For example, the Merge Date field displays as { MERGEFIELD Merge_Date }. The date format populates as MM/dd/yyyy by default. You could change the format to dddd, MMMM d, yyyy (e.g. Monday, January 3, 2022) by modifying the merge field to the following: { MERGEFIELD Merge_Date \@ "dddd, MMMM d, yyyy" }
Additional formatting options are detailed below.
- Month:
-
The letter "M" must be capitalized to distinguish months from minutes.
- M - Displays the month as a number without a leading 0 for single-digit months. For example, January displays as "1".
- MM - Displays the month as a number with a leading 0 for single-digit months. For example, January displays as "01".
- MMM - Displays the month as a three-letter abbreviation. For example, January displays as "Jan.".
- MMMM - Displays the month with its full name.
-
- Day of the month or day of the week:
- d - Displays the day of the month as a number without a leading 0 for single-digit days. For example, the sixth day of the month displays as "6".
- dd - Displays the day of the month as a number with a leading 0 for single-digit days. For example, the sixth day of the month displays as "06".
- ddd - Displays the day of the week as a three-letter abbreviation. For example, Monday displays as "Mon.".
- dddd - Displays the day of the week with its full name.
- Year:
- yy - Displays the year as two digits with a leading 0 for years 01 through 09. For example, 1999 displays as "99", and 2006 displays as "06".
- yyyy - Displays the year as four digits.
Change the Format of a Number Field
Open the merge template document in Word and press Alt+F9 (for a PC) or Option+F9 (for a Mac) to reveal the merge field codes. Locate the number field for which you'd like to change the format. After the current merge field text, enter " \# " followed by the desired display format in quotation marks.
- For example, the Grant Amount field displays as { MERGEFIELD Grant_Amount }. The format populates as $1000.00 by default. You could change the format to $1,000 by modifying the merge field to the following: { MERGEFIELD Grant_Amount \# "$#,##0;($#,##0)" }
Additional formatting options are detailed below.
- 0 - Specifies the requisite numeric places to display in the result. If the result does not include a digit in that place, Word displays a 0. For example, { = 4 + 5 \# 00.00 } displays as "09.00".
- # - Specifies the requisite numeric places to display in the result. If the result does not include a digit in that place, Word displays a space. For example, { = 9 + 6 \# $### } displays as "$ 15".
- x - Drops digits to the left of the "x" placeholder. If the placeholder is to the right of the decimal point, Word rounds the result to that place. For example, { = 111053 + 111439 \# x## } displays as "492", and { = 1/8 \# 0.00x } displays as "0.125".
- . - This format item determines the decimal point position. For example, { = SUM(ABOVE) \# $###.00 } displays as "$495.47".