Print Page | Close Window

how 2 substract years from current date

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=22724
Printed Date: 29 March 2026 at 12:51am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: how 2 substract years from current date
Posted By: deepak
Subject: how 2 substract years from current date
Date Posted: 19 February 2007 at 7:01am
if today is 19/feb/2007.. and if i substract 20 years from this .. i should get....19/feb/1987.. How to code this.. In ASP/MSaccess.
 
I am unable to find any date function.. which is outputting the required results.



Replies:
Posted By: Phat
Date Posted: 19 February 2007 at 9:18am
http://www.haneng.com/FunctionSearch.asp?s=DateAdd - http://www.haneng.com/FunctionSearch.asp?s=DateAdd use -20 as well

-------------
http://buildit.sitesell.com/sitebuildithome.html - Get a website that sells


Posted By: bootcom
Date Posted: 19 February 2007 at 5:23pm
Pretty much what you're wanting is:
 
DateAdd("yy", -20, now())
 
But look in to this closer, check out google and a cool beginner ASP resource, www.w3schools.com/asp.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net