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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I calculate the DifferenceIn Months?

Hi all,

I have a startdate and enddate

StartDate : 26/06/2013

EndDate : 02/08/2013

When I use the calculator Windows, the result is 1 month and 1 week , in qv it is 2month.

How can I have the result like the Windows calculator?

Thank for your help.

9 Replies
nagaiank
Specialist III
Specialist III

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

How do you want to use this value in QV? QV does not have an actual week interval. So for you above example, should it be something like "1.25 months" or do you want it to display "1 month and 1 week"?

-Rob

Not applicable
Author

Maybe like attached?\

Not applicable
Author

Hi Rob,

I would like just month.

Ajay your approach is good but if the month the end month possible is 28,30,31 not only 30.

Not applicable
Author

Rob, yes, I would like 1.25

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

How precise do you need to be? Can you just divide the number of days by 30?

(EndDate - StartDate)  / 30

Not applicable
Author

The calculator give me 1.2164383561655998.

(EndStart - StartDate) / 30 give me 1,2333333333333

Is it possible to have the value close to the calculator result or qlikview does an approximation ?

Thanks

MarcoWedel

What did you type into your calculator to get this value?

Not applicable
Author

I use the calculator Windows (Ctrl+E)

From : 26/06/2013

To : 02/08/2013