Wednesday, January 2, 2013

Finding week number of current date in current month in OBIEE


question is: How to calculate the week of the current month. 
To be more clear if the date is: 1-aug-2009 then week is:1, if it’s 8-aug-2009 then week is: 2 .
Like this, the week number should be generated for given date column.
The solution is: use the CEILING(DAYOFMONTH(“D0 Time”.”T00 Calendar Date”)/7.00) functionality in OBIEE Answers

Note: Use 7.00, not just 7 in the denominator to make it act as Real number