Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Calculate months between today or now and a date field

Hi all,

I've been researching the support and community forums but am stuck with what I think is straightforward issue. 

I need to calculate the # of months (or weeks or days, depending on project) to determine how many months from now (current date) until the  END_DATE field for a list of contracts

I've been able to calculate the # of months in a project from start to finish dates with this code and have tried to modify it several ways but can't get the syntax right for the equation END_DATE - current date output in months

((year([End Date])*12)+month([End Date])) - (((year([Start Date])*12)+month(Date#([Start Date])))) 

 

Any help greatly appreciated!

Tags (4)
1 Solution

Accepted Solutions
Highlighted

Re: Calculate months between today or now and a date field

May be this

(
  (Year(END_DATE)*12) + Month(END_DATE)
)
-
(
  (Year(Today())*12) + Month(Today())
) 

View solution in original post

2 Replies
Highlighted

Re: Calculate months between today or now and a date field

May be this

(
  (Year(END_DATE)*12) + Month(END_DATE)
)
-
(
  (Year(Today())*12) + Month(Today())
) 

View solution in original post

Partner
Partner

Re: Calculate months between today or now and a date field

thanks SO much! I knew it had to be simple 🙂