Click here to Skip to main content
16,010,416 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get 18 year back date in sql server or asp.net
thanks
Posted
Updated 20-Feb-12 23:44pm
v2
Comments
Aniket Yadav 21-Feb-12 5:45am    
what are you trying to do.. please elaborate...

Use

SELECT DATEADD(year, - 18, GETDATE())
 
Share this answer
 
Use the DATEADD function, the documentation[^] features even an example!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900