Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Difference between two months

I've got a table with the field OpenDate and i'd like to know how many months have passed between that date and today, can anyone suggest a formula?

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

i think you meant something like that:

...

num(month(now())) - num(month(OpenDate)) + (year(now()) - year(OpenDate))*12 as monthDiff

or absolut

fabs(num(month(now())) - num(month(OpenDate)) + (year(now()) - year(OpenDate))*12) as monthDiff

...

Best

Sacho

View solution in original post

2 Replies
Not applicable
Author

Hi,

i think you meant something like that:

...

num(month(now())) - num(month(OpenDate)) + (year(now()) - year(OpenDate))*12 as monthDiff

or absolut

fabs(num(month(now())) - num(month(OpenDate)) + (year(now()) - year(OpenDate))*12) as monthDiff

...

Best

Sacho

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

http://community.qlik.com/docs/DOC-3836

Regards,

Jagan.