Merging date field from Access to Word

A

ann

I have data in Access which I need to import into a Word
document that requires the date to be yyyy/MM/dd. I've
formatted the date/time field in Access as yyyy/MM/dd and
I've tried editing the field code in Word with the switch
{DATE\@yyyy/MM/dd"}, but my days and months are still
reversed when I do the merge for dates where the day is 1-
12. For example, The date January 9, 2003 is 2003/01/09
in Access and is 2003/09/01 in my merged Word document.
What can I do to fix this problem?
 
J

John Nurick

Hi Ann,

Use a query in Access; in a calculated field in the query use the
Format() function to format the date as a string the way you need it.
E.g.:
fMyDate: Format([MyDate], "yyyy/mm/dd")

I have data in Access which I need to import into a Word
document that requires the date to be yyyy/MM/dd. I've
formatted the date/time field in Access as yyyy/MM/dd and
I've tried editing the field code in Word with the switch
{DATE\@yyyy/MM/dd"}, but my days and months are still
reversed when I do the merge for dates where the day is 1-
12. For example, The date January 9, 2003 is 2003/01/09
in Access and is 2003/09/01 in my merged Word document.
What can I do to fix this problem?

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
C

Connie

I am having the exact same problem - I figured out that it
is defaulting to the short date format in the regional
settings on the control panel. Which ever short date
format is set in the regional settings is showing up in
Word. Why it won't pull the long date format I don't know
and would very much like the solution to this problem!!!!
 
A

Ann

Thanks so much!
-----Original Message-----
Hi Ann,

Use a query in Access; in a calculated field in the query use the
Format() function to format the date as a string the way you need it.
E.g.:
fMyDate: Format([MyDate], "yyyy/mm/dd")

I have data in Access which I need to import into a Word
document that requires the date to be yyyy/MM/dd. I've
formatted the date/time field in Access as yyyy/MM/dd and
I've tried editing the field code in Word with the switch
{DATE\@yyyy/MM/dd"}, but my days and months are still
reversed when I do the merge for dates where the day is 1-
12. For example, The date January 9, 2003 is 2003/01/09
in Access and is 2003/09/01 in my merged Word document.
What can I do to fix this problem?

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top