Select I.Fee From Item I WHERE GETDATE() - I.DateCreated < 365 days
How can I subtract two days? Result should be days. Ex: 365 days. 500 days.. etc...
Use DATEDIFF
Select I.Fee From Item I WHERE DATEDIFF(day, GETDATE(), I.DateCreated) < 365
1.4m articles
1.4m replys
5 comments
57.0k users