Link to home
Start Free TrialLog in
Avatar of thandel
thandel

asked on

Calculating tomorrow's date

I have a field code that I have been using to calculate tomorrow's date.  However lately the code seems to be reversing values so that on Aug 5, 2008, it is calc the date to be May 5, 2008.

Here is the document with the code, if you can provide any suggestions as to why this is happening I would appreciate it.   Thanks.

TodayDate.doc
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

When I first opened it, it displayed May 08, 2008, but when the field complex is updated (right-click and choose Update Field), it shows Aug 05, 2008.
It is still Aug 4th here, so that is correct.
Avatar of robsantos
robsantos

OMG!  I had no idea this was so dang complex when I started in on this...!
Sorry, I am not an expert at that, but I did find this:
How Can I Put Calculated Dates in My Document Using Word?
http://addbalance.com/word/datefields2.htm
which led me to
Delayed Dates macro (somebody oviously knows more than I!):
http://www.chriswoodman.co.uk/Delayed%20Dates.htm
I hope this helps you in some way (compare it or use it to your liking).
 
R
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thandel

ASKER

{mm}- {dd}- {yy}

Thanks that was it, I didn't even notice.... it has been working fine for months... odd.  Thanks again.
If the the value of the day is greater than 12, the date is unambiguous, whatever the regional setting and most applications will switch the month and day to get a legal date. You probably didn't actually see it at the beginning the month. You would only have a problem on 11 days. For July that would be - 1st to 6th and 8th to 12th.