Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
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

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