How to Format Dates in Mail Merge Fields
🔍 WiseChecker

How to Format Dates in Mail Merge Fields

When you run a mail merge in Word, dates from your data source often appear in raw formats like 2023-01-15 or 44563. This happens because Word pulls the underlying serial number or default source format instead of your preferred date style. You need a way to display dates as January 15, 2023 or 15/01/2023 without editing the source file. This article explains how to use Word’s field codes to control date formatting directly inside the mail merge document.

Key Takeaways: Formatting Dates in Word Mail Merge

  • Alt+F9 to toggle field codes: Shows the underlying MERGEFIELD code so you can add a date format picture switch.
  • \@ “MMMM d, yyyy”: The format switch that produces a date like January 15, 2023 inside the merge field.
  • Preview Results button: Lets you verify the formatted date before completing the merge.

ADVERTISEMENT

Why Dates Appear Incorrectly in Mail Merge Output

Word mail merge does not automatically convert date values into a human-readable format. The software takes the date exactly as stored in the data source, which may be a plain text string, a database date field, or an Excel serial number. When the source contains a serial number, Word displays a large integer instead of a date. When the source contains a text date, Word shows it in the original order and separator, which may not match your region or document style.

The fix lies in Word’s field code system. Every mail merge field is actually a MERGEFIELD field code. By adding a format switch to that code, you tell Word exactly how to display the date, regardless of the source format. This approach works with all common data sources: Excel worksheets, Access databases, Outlook contacts, CSV files, and SharePoint lists.

Understanding the Date Format Picture Switch

The format switch uses a pattern of letters that represent parts of a date. The most common placeholders are M for month, d for day, and y for year. The number of letters controls the display: M gives 1, MM gives 01, MMM gives Jan, and MMMM gives January. The same logic applies to d (1, 01, Mon, Monday) and y (23, 2023). You combine these placeholders with separators like spaces, slashes, dashes, or commas to match your preferred format.

Steps to Apply a Date Format Switch to a Mail Merge Field

These steps assume you have already connected your mail merge document to a data source and inserted a date merge field. If you have not inserted the field yet, do so now by clicking Mailings > Insert Merge Field and choosing the date field.

  1. Select the date merge field
    Click on the date placeholder in your document. It appears as «DateField» or similar text, depending on your field name.
  2. Press Alt+F9 to show field codes
    The field changes from «DateField» to { MERGEFIELD DateField }. If you are using a different field name, that name appears inside the braces.
  3. Add the format switch after the field name
    Type a space after the field name, then type \@ followed by a space and a double-quoted date format pattern. For example, to display dates as January 15, 2023, add \@ “MMMM d, yyyy”. The full code becomes { MERGEFIELD DateField \@ “MMMM d, yyyy” }.
  4. Press Alt+F9 again to hide field codes
    The field returns to showing the date placeholder, but the format switch is now applied.
  5. Preview the result
    Click Mailings > Preview Results. Word replaces the placeholder with actual data from the first record, formatted according to your pattern. Use the Next Record and Previous Record buttons to check multiple entries.
  6. Complete the merge
    Click Finish & Merge and choose your output option, such as Edit Individual Documents or Print Documents. The formatted dates appear in the final output.

Common Date Format Patterns

Use these patterns inside the \@ switch to produce specific date styles. Replace the example pattern in step 3 with one of these.

  • MM/dd/yyyy — 01/15/2023 (US format with leading zeros)
  • M/d/yyyy — 1/15/2023 (US format without leading zeros)
  • dd/MM/yyyy — 15/01/2023 (European format)
  • yyyy-MM-dd — 2023-01-15 (ISO format)
  • MMMM d, yyyy — January 15, 2023 (full month name)
  • MMM d, yyyy — Jan 15, 2023 (abbreviated month)
  • dddd, MMMM d, yyyy — Sunday, January 15, 2023 (full weekday and month)
  • ddd, MMM d, yyyy — Sun, Jan 15, 2023 (abbreviated weekday and month)

ADVERTISEMENT

Common Date Formatting Problems and Their Fixes

Date Still Appears as a Serial Number After Adding the Switch

If the date shows a five-digit number like 44927 instead of a readable date, your data source is storing dates as serial numbers. The format switch still works in this case. Make sure you typed the switch exactly as shown, with a space before \@ and the pattern inside double quotes. If the problem persists, the field may contain extra spaces or characters. Press Alt+F9 to check the code. It should look exactly like { MERGEFIELD DateField \@ “MMMM d, yyyy” } with no extra text inside the braces.

Month and Day Are Swapped in the Output

Word uses your Windows region settings as the default interpretation for date parts. If your data source has dates in a different order, the format switch overrides that. Verify that you used the correct letter case: MM for month and dd for day. Using mm instead of MM produces minutes, not months, and causes incorrect output. Replace mm with MM in the pattern.

Format Switch Does Not Work With Text Dates

If your data source stores dates as plain text, for example 2023-01-15 as a string, the format switch has no effect. Word treats a text string as literal text and cannot apply date formatting to it. Convert the text to a true date in the source application before merging. In Excel, use the DATEVALUE function to convert text to a date. In Access, use the CDate function. After conversion, the format switch works normally.

Mail Merge Date Format Options: Field Code Switch vs Source Formatting

Item Field Code Switch (\@) Source Formatting
Where applied Inside the Word mail merge document In the data source file (Excel, Access, etc)
Effect on output Controls date display in merged documents only Changes the source data permanently
Supports serial numbers Yes, converts serial numbers to readable dates Yes, if source column is formatted as Date
Supports text dates No, text strings are not converted Yes, but requires conversion in the source
Ease of use Requires editing field codes with Alt+F9 Uses standard formatting in the source application
Reusability Stays with the mail merge document Must be set up for each new merge

Using the field code switch is the preferred method because it does not alter your original data and works across multiple merges without reconfiguring the source. Source formatting is useful when you need a one-time conversion or when the data source already contains properly formatted dates.

You can now apply any date format to mail merge fields by editing the field code with Alt+F9 and adding the \@ switch followed by your chosen pattern. Start by testing the pattern MMMM d, yyyy for a full month name, then adjust the placeholders to match your region or document style. For advanced control, combine the date format switch with the \ MERGEFORMAT switch to preserve manual formatting you apply to the field.

ADVERTISEMENT