need an example of a DateAdd expression that adds years to a date

C

Carl T

I am looking for examples where someone has used an expression to calculate
using the DateAdd function where they want to add a certain number of years
to a given date.
 
D

Damian S

Hi Carl,

Simple one...

dateadd("yyyy", intNumYearsToAdd, dteDateToAddItTo)

Replacing the intNumYearsToAdd and dteDateToAddItTo with your own
variables/fields.

Damian.
 
F

fredg

I am looking for examples where someone has used an expression to calculate
using the DateAdd function where they want to add a certain number of years
to a given date.

See VBA help on the DateAdd function!!!!!!
To add 5 years to a date:
=DateAdd("yyyy",5,[ADateField])

To subtract 5 years from a date:
=DateAdd("yyyy",-5,[ADateField])
 
Top