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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate no of months from dates?

Hi,

I have below details in table box

                                 

DateEnter          DateComplete     Days

23/09/2009          26/10/2014      1859

12/10/2005          10/12/2013      2981

09/01/2000          23/09/2009      3545

13/02/2012          12/01/2015      1064

01/01/2010          02/12/2013      1431

The Days I can appear by subtracting DateEnter from DateComplete. I,e DateComplete - DateEnter. 26/10/2014 - 23/09/2009 = 1859

Instead of Days I need to show how many months are there? I,e if I do 26/10/2014 - 23/09/2009 = I need no of months

Please can anyone suggest me how to do this.

Thanks.

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

interval(DateEnter-DateComplete,'DD')/30   -> in months



Regards

Vimlesh

View solution in original post

6 Replies
ThornOfCrowns
Specialist II
Specialist II

Searching the forum gives me this:

http://community.qlik.com/thread/47580

Not applicable
Author

Hi,

interval(DateEnter-DateComplete,'DD')/30   -> in months



Regards

Vimlesh

peterwh
Creator II
Creator II

Hello,

I've found this formula:

=(Year('26/10/2014')-Year('23/9/2009'))*12+ Month ('26/10/2014') - Month('23/09/2009')

Kind regards

Peter

Not applicable
Author

Thanks for all.

Not applicable
Author

is there any way to calculate no of years between two dates?

Not applicable
Author

got it

interval(DateEnter-DateComplete,'DD')/365