I have a report that I should run every month, and select data from 21st of the same month of last year till 20th of the current month, current year. i.e. it's August 29 now and today I need to run my report, but I want it to show only data from 08.21.2016-08.20.2017 and when I run it on September I want data from 09.20.2016-09.21.2017 ...
I was using
Select *
from invt
where DATE > (GETDATE()-365)
but it it's approximate, and I have to run report exactly on 20th of each month.
Any idea how to do it ? TIA