Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 14 Oracle Analytics Lounge
- 211 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 77 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Calculate number of days for February in a leap year - MOD Functon in OBIEE 11g

Hello,
I am trying to calculate number of days in February for different years. How do I deal with a leap year? I found this formula online but I am not sure if MOD function works in OBIEE 11g.
(CASE WHEN Month (“Table Date”.”Date”) IN (1, 3, 5, 7, 8, 10, 12) THEN 31
WHEN Month (“Table Date”.”Date”) IN (4, 6, 9, 11) THEN 30
ELSE (CASE WHEN (MOD (YEAR (“Table Date”.”Date”), 4) = 0 AND MOD (YEAR (“Table Date”.”Date”), 100)! = 0) OR (MOD (YEAR (“Table Date”.”Date”), 400) = 0) THEN 29
ELSE 28 END) END)
Appreciate any inputs or alternate solutions. Thanks in advance.
Answers
-
OBIEE_Drool wrote: I am not sure if MOD function works in OBIEE 11g.
Yes, MOD is an OBIEE 11g function
Selected Mod Syntax MOD(expr1, expr2)
Where expr is any expression that evaluates to a numerical value.
Example Description Divides the first numerical expression by the second numerical expression and returns the remainder portion of the quotient.
0 -
Sorry it was the spaces that were causing the syntax issue. Thanks @Gianni Ceresa
0