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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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

4 Replies
sunny_talwar

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

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

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny