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
 
Back
Top