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.