Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

Try this

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

View solution in original post

6 Replies
Highlighted

Try this

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

View solution in original post

Highlighted
Creator III
Creator III

Thanks a lot sunny!
Highlighted
Creator III
Creator III

@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!!
Highlighted

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.

Highlighted
Creator III
Creator III

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!
Highlighted

No problem