Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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?

0 Replies