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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
sarfaraz_sheikh
Contributor III
Contributor III

Regarding condition

Dear All,

Whats wrong i am doing in below expression.. always the control is going in else part ...the condition found false everytime..

what i needs to do for condition being true.

Date(if(CREATE_DATE>=20150114,OPS_INWD_RECEIEVE_DATE,CREATE_DATE),'YYYYMMDD') AS Create_Date_Originl

Date(if(CREATE_DATE>='20150114',OPS_INWD_RECEIEVE_DATE,CREATE_DATE),'YYYYMMDD') AS Create_Date_Originl

Regards

Sarfaraz

1 Solution

Accepted Solutions
Michiel_QV_Fan
Specialist
Specialist

CREATE_DATE>=20150114


This part should be formatted as date because it's compared with a field that is defined as date (i presume) OPS_INWD_RECEIEVE_DATE.


20150114 is a number.


date(date#('20150114', 'YYYYMMDD'), 'MM-DD-YYYY') or your default date format

View solution in original post

3 Replies
Michiel_QV_Fan
Specialist
Specialist

CREATE_DATE>=20150114


This part should be formatted as date because it's compared with a field that is defined as date (i presume) OPS_INWD_RECEIEVE_DATE.


20150114 is a number.


date(date#('20150114', 'YYYYMMDD'), 'MM-DD-YYYY') or your default date format

Anonymous
Not applicable

Hi,

It depends on your date format, but I think you should use:

Date(if(date(CREATE_DATE)>=date('14/01/2015'),OPS_INWD_RECEIEVE_DATE,CREATE_DATE),'YYYYMMDD') AS Create_Date_Originl

sarfaraz_sheikh
Contributor III
Contributor III
Author

Thanks van de goor.....great solution working fine now as expected ......

Sarfaraz