By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,296 Members | 1,472 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,296 IT Pros & Developers. It's quick & easy.

SQL Code for todays date -90 days

P: 19
I have this code set up but I know the 3rd line is wrong. Could someone please help me on the code for pulling all entries for todays date -90 days? I would really appreciate it and thanks for helping.

SELECT *
from view1_4t
where DOB_ = (getdate()-90)
GO
May 16 '07 #1
Share this Question
Share on Google+
2 Replies


P: 16
I have this code set up but I know the 3rd line is wrong. Could someone please help me on the code for pulling all entries for todays date -90 days? I would really appreciate it and thanks for helping.

SELECT *
from view1_4t
where DOB_ = (getdate()-90)
GO

Try this code

Select * from view1_4t where dob=dateadd(dd,-90,getdate())
May 17 '07 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
You have posted this question in the Articles section. I am moving it to the SQL Server forum.

ADMIN
May 19 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.