Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Between Current Month and 6 Month

630064Jul 10 2008 — edited Jul 10 2008
Hi,

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))
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details