Date Format changes when printing

C

Claire

I have a Word template with several custom fields in it one of which is Last
Review Date. The toggle field code for this is: {DOCPROPERTY ReviewDate
\@"dd MMM yyyy"} On the screen the date is correct but when printed the date
is printed out in the American format so 8 Dec 2006 becomes 12 Aug 2006 and
the document field is updated as well. The fields in the document are only
supposed to be updated when the document is created or edited. I noticed in
the File/Properties/Custom tab that although the custom field is text the
value is in the format MM/dd/yyyy. I checked the code which updates the
field and it appears to be correct, adding the date as dd MMMM yyyy. I also
tried unticking the Tools/Options/Print Update Field but that didn't work
either. I am using Word 2002. Can anyone tell me how I can ensure the date
stays in the format I need? Any help is most appreciated. Thanks. Claire
 
P

Peter Jamieson

1. Verify that your regional settings (in control panel) are set so the date
format is DD/MM/YYYY (e.g. mine is set to UK English) rather than the US
format. If it's set to the US format, you get exactly the behaviour you
describe.

The thing is that some fields are updated when you Print Preview, some are
updated when you Print, and so on. It isn't completely straightforward.

On the whole, using DD/MM/YYYY format for a date in a data store such as the
Document Properties is not a particularly good long term bet - there may be
nothing you can do about it, but using e.g.

YYYY-MM-DD

works correctly regardless of the date setting in Control Panel.

Peter Jamieson
 
C

Claire

Thanks for your reply Peter. I've checked all settings, in Word, on my
computer and on the server and they are all set to Aus English.
I have been playing around with a few different things and changed the
custom field properties to a date field rather than a text field. This
appears to be working although why Word converts a text field to an US date
and keeps a date field to the correct format I'm not sure! I'll have to do a
bit more testing to make sure it works in all cases although I'll wait for
the beginning of next month so I don't have to keep changing the date on the
server. Thanks again for your help.
 

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