Hi all,
If I want to run the query today(12/2/2017) then my data should be inbetween 2016 January 1st (always previous year) to December 31st (always previous year) --I don't want to hard code dates.
if I want to run the query on jan 1st 2018 or in any day in 2018 then my data should be inbetween 2017 January 1st(always previous year) to 2017 December 31st(always previous year).
if I want to run the query in 2019 then my data should be inbetween 2018 January 1st (always previous year)to 2018 December 31st (always previous year).
how to write query, please advice.
What I have tried:
Hi all,
If I want to run the query today(12/2/2017) then my data should be inbetween 2016 January 1st (always previous year) to December 31st (always previous year) --I don't want to hard code dates.
if I want to run the query on jan 1st 2018 or in any day in 2018 then my data should be inbetween 2017 January 1st(always previous year) to 2017 December 31st(always previous year).
if I want to run the query in 2019 then my data should be inbetween 2018 January 1st (always previous year)to 2018 December 31st (always previous year).
how to write query, please advice.