Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie_To_Qlik
Contributor II
Contributor II

Compare 2 dates using IF

Hi Expert

I have the data as below and is trying to compare the 2 dates using IF function. 

If Schedule End date is later than Next Due Date then it will be Miss

If Schedule End date is same or earlier than Next Due Date then it will be Done

My function is as below but have problem with same month. Please help

=If ([Schedule End Date] > [Next Due Date], 'Done', 'Miss')

 

Schedule End DateNext Due DateMiss/Done
25 Jan 202101 Feb 2021Done
09 Feb 202117 Feb 2021Miss
11 Aug 202019 Aug 2020Miss
01 Sep 202008 Sep 2020Miss
19 Feb 202122 Feb 2021Miss
01 Sep 202008 Sep 2020Miss
19 Feb 202122 Feb 2021Miss
01 Oct 202012 Oct 2020Miss
29 Mar 202101 Apr 2021Done
01 Oct 202012 Oct 2020Miss
29 Mar 202101 Apr 2021Done
10 Feb 202118 Feb 2021Miss
11 Aug 202019 Aug 2020Miss
10 Feb 202118 Feb 2021Miss
11 Aug 202019 Aug 2020Miss
10 Feb 202118 Feb 2021Miss
11 Aug 202019 Aug 2020Miss
Labels (1)
  • SaaS

1 Solution

Accepted Solutions
MayilVahanan

Hi

Need to change in scripting side. 

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

3 Replies
MayilVahanan

HI

I think, ur date field is not in date format. 

Try to convert into date format like below in scripting

Date(Date#([Schedule End Date], 'DD MMM YYYY'), 'DD/MM/YYYY') as [Schedule End Date],

Date(Date#([Next Due Date], 'DD MMM YYYY'), 'DD/MM/YYYY') as [Next Due Date]

 

Then, in front end, it will work with same formula

If ([Schedule End Date] > [Next Due Date], 'Done', 'Miss')

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Newbie_To_Qlik
Contributor II
Contributor II
Author

Hi Mayil

I'm facing this error. Can help to advise. thanks 

Newbie_To_Qlik_0-1627545349783.png

 

MayilVahanan

Hi

Need to change in scripting side. 

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.