Formatting Issues

Fix Incorrect AM/PM Time Formatting in Word Mail Merge

Steven ParkerSteven Parker Oct 23, 2026 869 views

Question details

The user needs to correct the display of AM and PM time values generated during a mail merge operation.

Fix Incorrect AM and PM Formatting in Word Mail Merge
Product
Word
Device & OS
not provided
Scenario
Performing a mail merge where time values from a connected data source are displayed incorrectly in the final document.
Observed behavior
Time fields show incorrect formatting or raw formatting text instead of actual time periods due to invalid time-period syntax or improperly copied field codes.
Before you start

Ensure your data source (such as an Excel spreadsheet) contains the correct time values before troubleshooting the mail merge field codes in your document. You will need to press ALT + F9 on your keyboard to toggle the display of field codes.

Solution 1Recommended

Manually Type Lowercase am/pm in the Date-Format Switch

Adjusting the date-format switch to use lowercase 'am/pm' prevents the word processor from misinterpreting the letters as other formatting switches.

Sometimes, copying and pasting field codes introduces hidden formatting or syntax conflicts. Using lowercase letters and manually typing the field code ensures the syntax is clean and correctly interpreted by the mail merge engine.

1
Toggle field codes

Press ALT + F9 to reveal the mail merge field codes in your document instead of the preview data.

2
Locate the time field

Find the merge field that corresponds to your time data, which usually looks something like { MERGEFIELD FINAL_START }.

3
Edit the format switch

Manually type the format switch at the end of the field name to use lowercase letters, formatting it exactly like this: { MERGEFIELD FINAL_START \@ "h:mm am/pm" }. Avoid using uppercase AM/PM.

4
Update and preview

Press ALT + F9 again to hide the codes, then click the 'Preview Results' button in the Mailings tab to verify the time format is now correct.

Manually Type Lowercase am/pm in the Date-Format Switch
Manual Typing: If the format still fails to display correctly, delete the entire field code and type it manually from scratch instead of copying it from another section or document.
Efficient Mail Merge with WPS Office

Master Mail Merge Formatting Easily in WPS Writer

WPS Writer fully supports mail merge and standard field code formatting, allowing you to seamlessly pull data from WPS Spreadsheet or Excel to create formatted letters, emails, and labels.

  1. 1. Open Mail Merge: Launch WPS Writer and navigate to the 'References' tab on the top ribbon.
  2. 2. Connect Data Source: Click 'Mail Merge' and select 'Open Data Source' to link your spreadsheet containing the time data.
  3. 3. Customize Field Codes: Insert your merge fields and use ALT + F9 to customize the date/time format switches manually (e.g., \@ "h:mm am/pm").
  4. 4. Preview Results: Click 'View Merged Data' to preview your perfectly formatted AM/PM times.
Fully compatible with Microsoft Word field codes and date/time format switchesSeamless integration with Excel and WPS Spreadsheet data sourcesFree, lightweight, and user-friendly interface for all mail merge operations
microsoft office alternative - wps office

Frequently Asked Questions

Why does my mail merge display AM/PM as raw text or incorrect letters instead of the actual time period?

When using uppercase "AM/PM" in the field code switch, the word processor may misinterpret the "M" as a month formatting switch, causing conflicts. Using lowercase "am/pm" explicitly tells the application to format the time period.

How do I view the underlying mail merge field codes instead of the data?

You can toggle between viewing the merged data and the underlying field codes by pressing ALT + F9 on your keyboard in both Microsoft Word and WPS Writer.

Why didn't pasting a working field code fix my formatting?

Copying and pasting field codes can sometimes carry over hidden or corrupted background formatting. Manually typing the field code and its switch from scratch often clears these invisible errors.

Can I format dates and times differently if they come from the same Excel cell?

Yes, you can use a combined date-format switch like \@ "MMMM dd, yyyy h:mm am/pm" within a single MERGEFIELD to extract and format both the date and the time correctly.