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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
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