Date format problem in Mail Merge - Word 2010

Anonymous
2011-05-04T05:45:56+00:00

How do you change the date format in Mail Merge - Word 2010?

In the data file the date is fomated as DD-MMM-YY, yet in the merge document it appears as MMM/D/YY?

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Paul Edstein 82,871 Reputation points Volunteer Moderator
2011-05-04T06:38:39+00:00

Word has a number of different methods of connecting to mail merge data sources, including DDE and OLE DB. Word 2002 and later use the OLE DB coonection by default, though you can change this (to DDE, for example). To work around a limitation in the OLE DB provider used to get data from Excel etc., when Word is connected to an OLE DB data source, it treats dates as if they are in the US mm/dd/yy format, regardless of the format in Excel, your regional settings etc. Applying a date format switch fixes that - and gives the mailmerge document the ability to format the date independently of whatever format is used in the data source.

To get the date format you want, you can add a formatting picture switch as follows:

• select the mergefield;

• press Shift-F9 to expose the field coding. It should look something like {MERGEFIELD MyDate} where 'MyDate' is your mergefield's name;

• delete anything appearing after the mergefield's name and add '@ "dd-MMM-yy"' to the field, as in {MERGEFIELD MyDate @ "d MMMM yyyy"}. With this switch your date will come out as '2 August 2008'. Other possible date formatting switches include:

. @ "dddd, d MMMM yyyy";

. @ "ddd, d MMMM yyyy";

. @ "d MMM yyyy";

. @ "dd/MMM/yyyy".

Note: Note: you can swap the d, M, y expressions around, but you must use uppercase 'M's for months - lowercase 'm's are for minutes.

• position the cursor anywhere in this field and press F9 to update it;

• run your mailmerge.

Was this answer helpful?

700+ people found this answer helpful.
0 comments No comments

78 additional answers

Sort by: Newest
  1. Paul Edstein 82,871 Reputation points Volunteer Moderator
    2017-08-11T21:13:44+00:00

    Well, unless you're getting a different outcome when you merge to a new Word document or direct to a physical printer, I'd say the 'PDF engine' has nothing to do with it.

    Rather more likely is that your data source computer's regional date settings is configured for dates in, say, the D-M-Y format but you're storing them in the M-D-Y format, or that you've stored the dates in a mix of formats. The solution in that case, is to store all the dates in the same format - preferably a format that's consistent with your computer's regional date settings.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2017-08-11T13:52:49+00:00

    Paul - I am doing a merge from my newly adopted business system Dear Inventory. I finally figured out all the switches but it seems that I am getting almost random switching of the month and day when it renders to pdf. Dear (overseas) support claims that the PDF engine is doing it based on Canadian format or something to that effect. Do you have any idea what they are talking about and/or ideas to work around this?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Doug Robbins - MVP - Office Apps and Services 323.6K Reputation points MVP Volunteer Moderator
    2017-08-07T21:35:21+00:00

    You might be interested in my Merge Field Formatter add-in. 

    It is contained in a Merge Field Formatter.zip file that you can download from the following page of my One Drive:

    http://bit.ly/1hduSCB

    Then extract the files from the archive and read the

    “READ ME – FormattedMergeFields.docx

    to see how to install and make use of it.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2017-08-07T19:48:24+00:00

    Very many thanks for this!  Excellent job!  It actually works first time!  :)

    Was this answer helpful?

    0 comments No comments