# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Valued Contributor III

## difference in months

Hi Folks,

i have a following case, i have 2 Fields: From Date and To Date,

case 1:

From_Date          To_Date

21.03.2015          25.03.2015

if i use this procedure :

Date(Date#(From_Date, 'DD.MM.YYYY'))as From_Date,

Date(Date#(To_Date, 'DD.MM.YYYY'))as To_Date,

Num(To_Date) - Num (From_Date), so i can calcualte the Difference in Days, and it does work great

Problem Case:

From_Date          To_Date

06.10.2017          06.05.2019 > How can i calculate in this case  the Difference in months

Thanks a lot for any feedback and help

Beck

1 Solution

Accepted Solutions
Valued Contributor III

## Re: difference in months

Hi

i think you should look into this solution which is interesting too and try to replicate that in your app.

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

regards

5 Replies
Valued Contributor III

## Re: difference in months

Hi

date_diff  --->Num(To_Date) - Num (From_Date)

you can divide your date_diff/12 and ceil(date_diff/12),floor(date_diff/12) depending upon you want to include the current month or not.

regards

Valued Contributor III

## Re: difference in months

thanks a lot for your responce, but i dont understand this procedure, the funct: datediff i can normally use in excell but not in Qlik Sense

Thanks a lot

Beck

Valued Contributor III

## Re: difference in months

Hi

i think you should look into this solution which is interesting too and try to replicate that in your app.

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

regards

Valued Contributor III

## Re: difference in months

Prodosh Mate, thanks a lot for your responce and helps, it does work

have a nice day

kindly

Beck

Highlighted
Valued Contributor III

## Re: difference in months

This Issue is solved, Solution can be found here: Difference in Month