Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
sculptorlv
Creator III
Creator III

Date comparing

Please help! Can't get the right logic to compare dates.

I have variable DateX (the start date of the contract)

I have today date Today()

How can I get the answer,

   if 3 months is passed from the DateX date?

1 Solution

Accepted Solutions
tresB
Champion III
Champion III

If( AddMonths(DateX, 3) < Today(), '3 months passed' , 'Not yet')

View solution in original post

4 Replies
tresB
Champion III
Champion III

If( AddMonths(DateX, 3) < Today(), '3 months passed' , 'Not yet')

sculptorlv
Creator III
Creator III
Author

Thank you. This works.

I used the same logic .. but made mistake in another expression .. thus was looking for another solution.

Thank you once again.

berndjaegle
Creator II
Creator II

Be aware, that AddMonths() will not cut the time Information from your DateX. Today() on the other hand has time 00:00:00. In my case I had to floor my date.

date(floor(<DateX>), 'MM/DD/YYYY').

sculptorlv
Creator III
Creator III
Author

Thank .. I guess this info could help me in my previous solution logic