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

Re: Create a future & past date in Word by Jay

Jay
Wed Apr 02 10:17:03 PDT 2008

You should find what you need in macropod's post at
http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=249902.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

JT Klipfer wrote:
> 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



Re: Create a future & past date in Word by JTKlipfer

JTKlipfer
Wed Apr 02 12:31:00 PDT 2008

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

"Jay Freedman" wrote:

> You should find what you need in macropod's post at
> http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=249902.
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup so
> all may benefit.
>
> JT Klipfer wrote:
> > 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
>
>
>