How do I apply case function to a Leap Year that occurs every four years to a date formula?
I have this DATA ITEM 1 entitled INSURANCE TERM query in cognos that has a formula inside.
(12 * _days_between([Policy Expiration Date],[Policy Effective Date]))/365
Below is the property of the expression Policy Expiration Date in case you want to know.
The formula is used to calculate the Insurance Term. 12 months multiplied to the number of days between [Policy Expiration Date],[Policy Effective Date] in the prompt below. Divided to 365 days as a regular year.
How do I incorporate the case function between a regular year and a leap year? Something like this..
Case when Year([Policy Expiration Date]) in ('2013', '2014', '2015') then DATA ITEM 1 else DATE ITEM 2((12 * _days_between([Policy Expiration Date],[Policy Effective Date]))/366)
But I can't afford to write the in(2008-2032 leap year) because it would be too long. Is there a way to do this workaround?