Between Current Month and 6 Month
630064Jul 10 2008 — edited Jul 10 2008Hi,
I want to filter out data from current month to 6 months from current month. Below is what I used to filter out the current month and 6 months from current month. I have the current month filter working, but the 6 months filter is only filtering out current date to 6 months. I would like all data to show the entire data from July as current month to January, 6 months.
Current Month
D_DATE.DATE_ID >= TIMESTAMPADD(SQL_TSI_MONTH, 0, TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE)-1), CURRENT_DATE))
6 months
D_DATE.DATE_ID <= TIMESTAMPADD(SQL_TSI_MONTH, 6, TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE)-1), CURRENT_DATE))