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

Calculating # of months between two dates

Start_date               End_date               Number of Months

01-12-2014              01-06-2015              ???

Hey guys from the table above, how can I calculate the number of month between those dates. Any help will be truly appreciated.

Thanks.

5 Replies
MK_QSL
MVP
MVP

Like this..

=Year(Date#('01-06-2015','DD-MM-YYYY'))*12 + Month(Date#('01-06-2015','DD-MM-YYYY')) - (Year(Date#('01-12-2014','DD-MM-YYYY'))*12 + Month(Date#('01-12-2014','DD-MM-YYYY')))

sunny_talwar

Same exact expressions as Manish, but I thought this will be a good link to see:

How Do I Get the Number of Months Between Two Dates?

Anil_Babu_Samineni

You may use this

=Month(Date#(Start_date,'DD-MM-YYYY')) - Month(Date#(End_date,'DD-MM-YYYY'))

OR Simple this

=Month(Start_date) - Month(End_date)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

hi

I think this will help's You..

Round((Date(EndDate)-Date(StartDate))/30) & '  Months'
Not applicable
Author

Thanks Manish for your help