Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
D19PAL
Creator II
Creator II

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

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

View solution in original post

D19PAL
Creator II
Creator II
Author

Trying it now, thanks

View solution in original post

5 Replies
stevejoyce
Specialist II
Specialist II

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

OmarBenSalem

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

D19PAL
Creator II
Creator II
Author

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

D19PAL
Creator II
Creator II
Author

Trying it now, thanks

D19PAL
Creator II
Creator II
Author

Worked a treat thanks