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: Most helpful
  1. Paul Edstein 82,871 Reputation points Volunteer Moderator
    2014-02-10T20:04:46+00:00

    How can I change the color of the text that is being brought by my mail merge. For example one of the fields is date and I want it to be in red color. How do I do it?

    Try adding a Charformat switch to the field. For example, suppose you have:

    {MERGEFIELD MyDate @ "DDDD, D MMMM YYYY"}

    Change this to:

    {MERGEFIELD MyDate @ "DDDD, D MMMM YYYY" \* Charformat}

    and format the 'M' in MERGEFIELD in red.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2013-08-29T08:14:20+00:00

    I encounter a different problem, also related to date formatting. I have a list of dates in Excel, but Word seems to mix day and month in the mail merge. Example:

    02 May (in excel) turns into 5 February (in word mail merge)

    29 August (in excel) stays 29 August

    9 November (in excel) again turns into 11 Sept (in word mail merge)

    How does this work??

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2012-08-13T13:16:33+00:00

    Hi Paul,

    I've referenced your above answer in August 2012 and it works perfectly on an as-required basis for Date fields in mail merges. Thank you very much.

    However I'm interested in a solution that fixes the cause and not the symptoms. Is there a specific Microsoft Update that permanently resolves this OLE DB issue and leaves dates in their original regional format?

    "...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."

    Cheers,

    Greg.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2012-06-19T15:58:41+00:00

    One possibility is to create a query in the Access database that uses the format function to convert the date to the string format that you really want, e.g.

    SELECT birthdate, format(birthdate,'DD/MM/YYYY') as bdstring

    FROM mytable

    That may play havoc with any Memo fields that you need to merge, though.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments