Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
manoj217
Creator III
Creator III

find date is greater than or not without set analysis

if(paymentDate >= date($(SelectDateFrom),'MM-DD-YYYY'), True, False)

PaymentDate=15-06-2017

SelctedDateFrom=01-06-2017

But output is showing false please suggest the correct syntax to get the exact output

11 Replies
Sergey_Shuklin
Specialist
Specialist

Hello!

Is this format "MM-DD-YYYY" suitable for such values 15-06-2017?

avkeep01
Partner
Partner

Hi manoj217‌,

Try '$(SelectedDateFrom)' and SelectedDateFrom instead of $(SelectedDateFrom) of maybe even $(=SelectedDateFrom). That can give different results.

Maybe it is because PaymentDate is with or without the capital P. But that is just a guess based on the different ways you wrote paymentDate.

avkeep01
Partner
Partner

Also you use: SelectDateFrom and SelctedDateFrom in your post. Maybe that is also wrong in you application.

sunny_talwar

Try this

If(paymentDate >= Date#($(SelectDateFrom), 'MM-DD-YYYY'), True, False)

sunny_talwar

or this

If(paymentDate >= Date#('$(SelectDateFrom)', 'MM-DD-YYYY'), True, False)

avkeep01
Partner
Partner

Try this, in my case it worked. 

=if(PaymentDate>= date('$(SelectedDateFrom)'), True(), False())

andrei_delta
Partner
Partner

hi,

you should format the "SelectDateFrom" as 'DD-MM-YYYY'.

manoj217
Creator III
Creator III
Author

Sorry i gave an example only.

consider

paymentdate =06-15-2017

selecteddatefrom=06-01-2017

manoj217
Creator III
Creator III
Author

not working every time it is showing false only