Calculating dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to calculate a date by adding 3 years to an existing date on a form.
How do I due that and account for Leap years?
 
Wendell said:
I need to calculate a date by adding 3 years to an existing date on a form.
How do I due that and account for Leap years?

Adding three years has nothing to do with leap years. If you add three
years onto April 3, 1999, you get April 3, 2002 even though 2000 was a leap
year. In any case, the DateAdd function will do it:

DateAdd("yyyy", 3, [Starting Date])

Tom Lake
 
Thanks!

Wendell

Tom Lake said:
Wendell said:
I need to calculate a date by adding 3 years to an existing date on a form.
How do I due that and account for Leap years?

Adding three years has nothing to do with leap years. If you add three
years onto April 3, 1999, you get April 3, 2002 even though 2000 was a leap
year. In any case, the DateAdd function will do it:

DateAdd("yyyy", 3, [Starting Date])

Tom Lake
 

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

Back
Top