Answer the question
In order to leave comments, you need to log in
How to get data from database up to 5 years old on SqlServer?
How can I get data from a database up to 5 years old on SqlServer? Tried like this:
DATEDIFF(YEAR, BirthDay, GETDATE()) <= 5
--(GETDATE() - BirthDay_BirthDay) <= 5
--BirthDay > DATEADD(YEAR,-5,GETDATE())
--(YEAR(GETDATE())-YEAR(BirthDay)<=5)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question