Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to add 3 years to a date value in a query

Status
Not open for further replies.

ToyFox

Programmer
Jan 24, 2009
161
US
I have a query with a date field. I need to display that value and add 3 years. Not every row contains a value.
What is the best approach.
 


Hi,

Please be more specific. Maybe an example of a row that has a date and a row that has no date. Don't understand your data structure

Now a date plus 3 years issue. Does that mean date plus 365.25 * 3 days, or year of date plus 3; days being constant -- but what happens if the date is February 29? You must be more specific.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
u need to use the function : DateAdd

like


NewDate = DateAdd("y",3,YourDate)

Greets
 
Thanks, I knew there was an easier way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top