Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
triciagdaly
Contributor III
Contributor III

Problem with calculating months difference between 2 dates


I am using the following expression to calculate the months difference between today and the EFFECTIVE_DATE, but when the two dates are within the same month, the expression is failing instead of returning 0.  Any ideas?

year(today(2))*12)+month(today(2))) - (((year(EFFECTIVE_DATE)*12)+month(EFFECTIVE_DATE)))

Thanks much!

10 Replies
triciagdaly
Contributor III
Contributor III
Author

All,

Thank you all for your input.  The only thing that seems to work is to put the original expression in the load script.  Not sure why the expression will not work, but I surrender to the quirks of qlikview