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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Difference between two dates?

Hi,

I have two dates stored in two object text.

I want to obtain the number of months between theses two dates?

How i proceed?

Thnks

3 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

use the expression month(field1)-month(field2)

Not applicable
Author

Hi,

The complete expression is:

(Year(End_Date)-Year(Init_Date))*12 + Num(Month(End_Date))- Num(Month(Init_Date))

Regards.

Not applicable
Author

use this

round((date1-date2)/30)