Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
avastani
Partner - Creator III
Partner - Creator III

InMonthToDate() & Leap Year problem

Has anyone faced an issue with the InMonthToDate() function when comparing with a date a year ago when the prior year was a leap year.

Essentially what seems to be happening is that 2/29 of every year after the leap year gets skipped. here's my flag,

If(InMonthToDate(MasterCalendarDate, AsOfDate, -12),1,null()) as FlagLastYrCurrMTD,

If(InMonth(MasterCalendarDate, AsOfDate, -12),1,null()) as FlagLastYrCurrMonth,

   

I am building an AsOfDate table that references other dates in reference to a date selected. So if the AsOf Month = February 2013, 02/29/2012 would be considered InMonthToDate as the entire month has passed, so both flags would be 1.

thoughts anyone?

Labels (1)
0 Replies