Add 3 years to date

Dina01

Registered User.
Local time
Today, 14:02
Joined
Apr 24, 2002
Messages
87
hello I have a query that has a field named BeginDate. I need to add 3 years to this date...HOw do I do this is a query..

I think it's something like this...but I am not too sure
dateadd("y",+3, date())

Can anyone help me...
 
If the field you want to add 3 years to is BeginDate then the following should work

DateAdd("yyyy",+3, [BeginDate])

or

DateSerial(year([BeginDate])+3,month([BeginDate]),day([BeginDate]))
 
Last edited:
I tried to ad this in my criteria of the query but I keep on getting eroror that I forgot a comma, or the operator is not valid...etc.....
Tried both
 
Here's a working example using the Orders table in Northwind. Just copy/paste to a new query in Northwind then run it. Transfer the syntax to your query and it should work.
Code:
SELECT Orders.OrderID, Orders.OrderDate, DateAdd("yyyy",3,[OrderDate]) AS orderPlus3
FROM Orders;
 
If the field you want to add 3 years to is BeginDate then the following should work

DateAdd("yyyy",+3, [BeginDate])

or

DateSerial(year([BeginDate])+3,month([BeginDate]),day([BeginDate]))

excellant reply appreciated.
 

Users who are viewing this thread

Back
Top Bottom