future date problem

A

aardvick

You all know the problem:
I want a date that is some days ahead (or behind) the date in my merge
field. I have spent hours now messing around with the code from the
following 2 sites:
Charles Kenyon's ( http://addbalance.com/word/datefields2.htm) and
Macropod's (www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902)

They use very different methods to solve the problem, however NEITHER of
them are giving me the right answer! I have been using the DATE function for
input (no merge involved) and a delay of 14 days. For today's date (2/19/09)
they BOTH give me the wrong answer! One gives me Feb 33, 2009 and the other
gives me May 3, 2009. Interestingly, they both give right answer when I use
a 7 day delay.

Help anyone?
 
D

Doug Robbins - Word MVP

You have overlooked the following part of the Introductory Notes to
Macropod's methods:

Quote

Date input/output formats

Many date fields in this document are region-dependent and are coded to work
on systems using day-month-year regional settings. For system using
month-day-year regional settings, obtaining a correctly result is as simple
as changing the order of the embedded fields coded as '{dd}-{mm}-{yy}'to
'{mm}-{dd}-{yy}'. Included in this document is a macro to automate the
change. Changing the order shouldn't be necessary for systems using
day-month-year settings; for those using month-day-year settings, it's a
once-only change. To run the macro, Press Alt-F8 and select the macro named
'SwapDayMonthCodes', then click 'Run'.

Unquote

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
A

aardvick

That did it. Thanks a million! -V

Doug Robbins - Word MVP said:
You have overlooked the following part of the Introductory Notes to
Macropod's methods:

Quote

Date input/output formats

Many date fields in this document are region-dependent and are coded to work
on systems using day-month-year regional settings. For system using
month-day-year regional settings, obtaining a correctly result is as simple
as changing the order of the embedded fields coded as '{dd}-{mm}-{yy}'to
'{mm}-{dd}-{yy}'. Included in this document is a macro to automate the
change. Changing the order shouldn't be necessary for systems using
day-month-year settings; for those using month-day-year settings, it's a
once-only change. To run the macro, Press Alt-F8 and select the macro named
'SwapDayMonthCodes', then click 'Run'.

Unquote

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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