Reputation: 7397
I am trying to figure out how to query a database and go back 10 days from a certain date column. I am using SQL Server 2012.
Where Date_Complete IS (10 days ago or newer)
Any help with this would be greatly appreciated!
Upvotes: 2
Views: 43
Reputation: 5947
Did you mean this
WHERE Date_Complete >= DATEADD(day,-10, yourdatecolumn)
If you want to consider the time from today then it'd be
WHERE Date_Complete >= DATEADD(day,-10, GETDATE())
Upvotes: 4