Fix Incorrect AM/PM Time Formatting in Word Mail Merge
Question details
The user needs to correct the display of AM and PM time values generated during a mail merge operation.

- 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.
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.
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.
Press ALT + F9 to reveal the mail merge field codes in your document instead of the preview data.
Find the merge field that corresponds to your time data, which usually looks something like { MERGEFIELD FINAL_START }.
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.
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.

Combine Date and Time Formatting in One Merge Field
If your data source provides the date and time in the exact same column, you should combine the formatting switch into a single string.
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. Open Mail Merge: Launch WPS Writer and navigate to the 'References' tab on the top ribbon.
- 2. Connect Data Source: Click 'Mail Merge' and select 'Open Data Source' to link your spreadsheet containing the time data.
- 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. Preview Results: Click 'View Merged Data' to preview your perfectly formatted AM/PM times.

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.




