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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
simonwithey
Contributor
Contributor

Date variable

I have the following variable:

LET vMonthStart = monthstart(Today());

Then in my data load I have:

WHERE "My_Date" < $(vMonthStart);

It returns no records but if I use WHERE "My_Date" <> $(vMonthStart); it does.


I need the less than function to work rather than not equal to.


What am I doing wrong??


Many thanks

Labels (1)
4 Replies
sunny_talwar
MVP
MVP

May be add single quotes around your variable

WHERE "My_Date" < '$(vMonthStart)';

simonwithey
Contributor
Contributor
Author

Cheers Sunny, that seems to work. Thanks for the prompt response.

its_anandrjs
Champion III
Champion III

May be you can use it direct also

Ex:-

WHERE "My_Date" < vMonthStart


Or


WHERE "My_Date" < '$(vMonthStart)'


sunny_talwar
MVP
MVP

That's awesome, please close the thread if you got what you wanted.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny