Qlik Community

New to Qlik Sense

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

cancel
Showing results for 
Search instead for 
Did you mean: 
saikripa
Contributor III
Contributor III

Compare date variable in script

Hello,

I have 4 date variables , iDate, hdate, pDate and paDate. I need to check if all the dates are same. 

My code was:

if $(hDate)=$(iDate) and $(iDate)=$(pDate) and $(pDate)=$(paDate) and $(paDate)=$(hDate) then
Let vFlag=0;
else
Let vFlag=1;

This doesn't seem to work.

1 Solution

Accepted Solutions
anat
Specialist II
Specialist II

=if((v1=v2 and v1=v3 and v1=v4 and v2=v3 and v2=v4 and v3=v4 ),1,0)

View solution in original post

2 Replies
anat
Specialist II
Specialist II

=if((v1=v2 and v1=v3 and v1=v4 and v2=v3 and v2=v4 and v3=v4 ),1,0)

saikripa
Contributor III
Contributor III
Author

Thanks!! It works