Create a future & past date in Word

J

JT Klipfer

If today's date is 20080401 (4/1/08), I would like to have a date
automatically inserted that is 10 years in the future, but 1 day prior:
20180331.

The following field codes work just great for almost every instance:
{={createdate \@ "yyyy"}+10 \# "0000"}{createdate \@ "MM"}{={createdate \@
"dd"}-01 \# "00"}

Problem is, yesterday (4/1/08), those fields yielded: 20180400 -- not a
real date. I know it will require combining the month & day portions of my
fields into a contiguous field to get the subtraction of 1 day correct.
Problem is, even when I try that I still end up with April 00th:
{={createdate \@ "MMdd"}-1 \# "0000"} --> 0400
{={createdate \@ "MMdd"}-1 \@ "MMdd"} --> 400

I would like to try and accomplish this without any programming or add-ins
to my system ... problems with network administrators. Any help would be
greatly appreciated. Thanks--JT
 
J

JT Klipfer

THanks; it took me a while playing around with it ... but I finally got it.--JT
 

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