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

Months caluculation

Dear All

Book DateTodayDiff Months
26/12/200826/12/201136
26/12/200926/12/201124
26/12/201026/12/201112
26/9/201126/12/20113

I want to caluculate Diff in months please  help me with  backend script

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

((Year(BookDate)-Year(Today()))*12)+(Month(BookDate)-Month(Today())) as [Month Diff]

You can see also the attach qvw.

View solution in original post

4 Replies
rohit214
Creator III
Creator III

hi

try this

in script

num(month(BookMonth) as BookMonth,

num(Month(today() ) as taday,

or

num(Month(today() ) - num(month(BookMonth) as Diff

in expression

today-bookMonth

may it helps you

thanks

rohit

SunilChauhan
Champion II
Champion II

try this

interval(Today- BookDate,MM)

Sunil Chauhan
Clever_Anjos
Employee
Employee

LET d1 = today();

LET d2 = '01/02/2005';

LET MonthsBetween = year(d1)*12 - Month(d1) - (year(d2)*12 - Month(d2));

Not applicable
Author

Hi,

((Year(BookDate)-Year(Today()))*12)+(Month(BookDate)-Month(Today())) as [Month Diff]

You can see also the attach qvw.