Joel David Posted June 26, 2019 Share Posted June 26, 2019 I am using sql server 2008 R2 and am trying to extract new invoice items that are added to my database. I wanted to be able to pull any item that was invoiced this week, but not in 'X' number of previous weeks...Any help would be appreciated...Thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted June 26, 2019 Share Posted June 26, 2019 If you have the invoice date then you can use datediff to compare it with another date to see how far it is: https://docs.microsoft.com/en-us/sql/t-sql/functions/datediff-transact-sql?view=sql-server-2017 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now