Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Don't miss the upcoming Q&A with Qlik session on Qlik Application Automation on November 16th! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
D19PAL
Creator
Creator

Text field with typed in date

Hi,

I've got two fields 

ID, textfield

1, fghh

1, 56gh

2,  01-12-1987

3, hghug654

2, 07-12-1987

 

I want to create an if statement, if ID = 2, show me the two dates in new field as dates not text.

 

Thanks

 

 

 

 

2 Solutions

Accepted Solutions
OmarBenSalem
Partner
Partner

Maybe somthing like
if(ID=2, date(date#(textfield,'DD-MM-YYYY')),textfield) as YourField

View solution in original post

D19PAL
Creator
Creator
Author

Trying it now, thanks

View solution in original post

5 Replies
stevejoyce
Creator III
Creator III

if(ID =2, date#(textfield, 'DD-MM-YYYY') as new_date_field

OmarBenSalem
Partner
Partner

Maybe somthing like
if(ID=2, date(date#(textfield,'DD-MM-YYYY')),textfield) as YourField

View solution in original post

D19PAL
Creator
Creator
Author

That's giving a result of 0, which is not what I was expecting 

D19PAL
Creator
Creator
Author

Trying it now, thanks

View solution in original post

D19PAL
Creator
Creator
Author

Worked a treat thanks