how to calculate a date 3 yrs on

G

Guest

Does anyone know how to calculate a column by adding 3 years to the date?

Once I can calculate this it may go into Queries or Tables.

The first column is date of H&S certificate and the next column is due date
of next certificate update which is plus 3 years. Certificates are updated
every 3 years.

first column - 16/10/2003 second column [Exp Date] +3yrs

I did try =DateAdd("y", 3, "16/10/2003") and =DateAdd("y", 3, [Exp Date]).
I tried others. Please can anyone help?

Kim Johnson
 
F

fredg

Does anyone know how to calculate a column by adding 3 years to the date?

Once I can calculate this it may go into Queries or Tables.

The first column is date of H&S certificate and the next column is due date
of next certificate update which is plus 3 years. Certificates are updated
every 3 years.

first column - 16/10/2003 second column [Exp Date] +3yrs

I did try =DateAdd("y", 3, "16/10/2003") and =DateAdd("y", 3, [Exp Date]).
I tried others. Please can anyone help?

Kim Johnson

Access/VBA help files are a good resource when used.

1) The Year argument for DateAdd() is "yyyy", not "y".
=DateAdd("yyyy", 3, [ExpDate])

2) When using a written date you must surround the date with the date
delimiter symbol #, not quotes.

=DateAdd("yyyy", 3, #16/10/2003#)
 

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