Date Calculations

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

I have a field where I would like to add 3 years to a
previous date. However, I wish also to retain the
original day# which does not happen if the 3 year span
includes a leap year.

i.e. 7/1/04 + 3 years = 7/1/07 (fine no leap year)
7/1/07 + 3 years = 6/30/10 (08 is a leap year)
but I want 7/1/10

thanks.
 
Dear Michael:

I suppose you may be adding 3 * 365 days.

If you use the DateAdd function it will do this the way you want.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Thank you

-----Original Message-----
Dear Michael:

I suppose you may be adding 3 * 365 days.

If you use the DateAdd function it will do this the way you want.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts




.
 
Thank you
-----Original Message-----
DateAdd("yyyy",3,[YourDateField])

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


I have a field where I would like to add 3 years to a
previous date. However, I wish also to retain the
original day# which does not happen if the 3 year span
includes a leap year.

i.e. 7/1/04 + 3 years = 7/1/07 (fine no leap year)
7/1/07 + 3 years = 6/30/10 (08 is a leap year)
but I want 7/1/10

thanks.


.
 
Back
Top