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])
 

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