Date Query

  • Thread starter Thread starter Fae McCrackren
  • Start date Start date
F

Fae McCrackren

I always have trouble with date fields. I realize it is a pretty simple
query, but could someone give me (a generic) expression to calculate what a
date would be from another date. i.e. field is "declaration date"and I want
to show the a date that is 48 months from the "declaration date". Right now
I just use [Declaration Date]+365*4+1
 
I always have trouble with date fields. I realize it is a pretty simple
query, but could someone give me (a generic) expression to calculate what a
date would be from another date. i.e. field is "declaration date"and I want
to show the a date that is 48 months from the "declaration date". Right now
I just use [Declaration Date]+365*4+1

Use the DateAdd() function. Type Ctrl-G to open the VBA editor (to get the
right help file) and search for help on DateAdd. You could use either

DateAdd("yyyy", 4, [Declaration Date])

to add four calendar years, or

DateAdd("m", 48, [Declaration Date])

to add 48 months.
 
Back
Top