Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
cancel
Showing results for 
Search instead for 
Did you mean: 
gf
Creator III
Creator III

Convert string to date and compare with date today

Sorry for asking but i can't find the right solution...

In my expression, I want to convert a string into date and then i want to compare this date with the date today, in order to check if converted date is in the future or past.

I tried =Date(Date#('11-07-2019', 'DD.MM.YYYY'), 'DD.MM.YYYY') to display 11.07.2019 in a textbox but the output is " - ".

Thanks in advance!

Labels (4)
1 Solution

Accepted Solutions
sunny_talwar

Try this

 =Date(Date#('11-07-2019', 'DD-MM-YYYY'), 'DD.MM.YYYY')

View solution in original post

6 Replies
sunny_talwar

Try this

 =Date(Date#('11-07-2019', 'DD-MM-YYYY'), 'DD.MM.YYYY')

View solution in original post

gf
Creator III
Creator III
Author

Thanks a lot sunny!
gf
Creator III
Creator III
Author

@sunny_talwar may i ask you one more question.
Is an expression like this possible?
=IF(Date(date#(Duedate,'DD-MM-YYYY'),' DD.MM.YYYY')<DATE(MonthEnd(Today(),+1), 'DD.MM.YYYY'),Status='YES' AND
IF(TestText='Missing Due Date', Count(IF(Duedate='',Duedate)),
IF(TestText='Total yes all ref', Count(If(Status='YES',Status)),
IF(TestText='A1 - NO',Count({<Reference={'A1'}>} IF(Status = 'NO',Status)),
IF(TestText='B1 - NO',Count({<Reference={'B1'}>} IF(Status = 'NO',Status)),
IF(TestText='C1 - NO',Count({<Reference={'C1'}>} IF(Status = 'NO',Status)),
IF(TestText='TOTAL',Count(IF(Duedate<>'',Duedate)))
))))))

Thank you very much and Regards!!
sunny_talwar

Highlighted some of the issues

image.png

1) You have a comma and after that you have another condition... can't work like this... you need 'AND' or 'OR' between them or just give a value (like 'YES') without equal

2) You cannot have AND and IF like this... you can either remove AND or IF based on your requirement...

 

There might be others, but it is difficult to know the issue without knowing the underlying goal.

gf
Creator III
Creator III
Author

Thank you again for the fast answer!
I will look for a work-around.
(And sorry for asking a different question in this thread)

Regards!
sunny_talwar

No problem