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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I add 3 years to a datetime field from a database.

Status
Not open for further replies.

levi71

Programmer
Jul 1, 2001
5
US
I need to dynamically add 3 years to a datetime that has previously been entered from a form, and show that date on my asp page. Anyone know how to do that?
 
You can use the dateadd function

ex:
dim newdate
newdate = dateadd("yyyy",1, theDbDate)

hope this helps
leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top