Tuesday, December 9, 2008

OBIEE First / Last day previous week

First day of the previous week:

TIMESTAMPADD(SQL_TSI_DAY,-6, (TIMESTAMPADD(SQL_TSI_DAY, DAYOFWEEK(CURRENT_DATE) *-1,CURRENT_DATE)))

Last day of the previous week:

TIMESTAMPADD(SQL_TSI_DAY, DAYOFWEEK(CURRENT_DATE) *-1,CURRENT_DATE)

Till Next Time

2 comments:

Anonymous said...

Hi I need Last day of previous week in Oracle 10g

Please help me

Anonymous said...

Hi How to get previous 4 weeks+current week data in OBi?