Calculated Date Fields

A

Andy B.

Is there any way to do date calculations with field codes
(i.e. without resorting to VBA), specifically in the
following two situations:

1. I would like to print the last day of the month
immediately preceding the current date (i.e. the result of
a Today field code). For example, today is 10/29/03 and I
would like to insert a reference to September 30, 2003. I
assume that I can parse the date. The month is "easy" [{
QUOTE { IF { DATE \@ "M" } = 1 "12" " {= { DATE \@ "M" } -
1 } " }/1/95 \@ "MMMM" }] and the year is similar. The
day appears to be much more difficult. How do I do the
day and is there an easier method to do the entire date?

2. I would like to insert a date which is 60 days (for
example) after the date obtained using an Ask field.

Thank you.

Andy B.
 
M

macropod

Hi Andy,

Check out:
http://www.wopr.com/cgi-bin/w3t/showflat.pl?
Cat=&Board=wrd&Number=249902
(url all on one line)
where you'll find a downloadable Word document with all
sorts of date-calculation fields, including some that
address your needs. If you run into any difficulties, post
a query there - where I'll be more likely to notice it.

Cheers
 

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