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

Announcements
Register by January 31 for $300 off your Qlik Connect pass: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
thomaswrieck
Partner - Creator
Partner - Creator

where statement in variable

Hi,

maybe a stupid question ... I want to store a Where clause in a variable and use it when calling a subroutine ...

LET vWhereCM = 'Vehicle.CheckInDate>=' & chr(39) & '06/01/2008' & chr(39);

That is what I have currently but the string then results as :

.

.

.Resident Summary WHERE Vehicle.CheckInDate>=''06/01/2008''

What do I need to specify to get :

Resident Summary WHERE Vehicle.CheckInDate>='06/01/2008' ?

Thanks a lot for a tip ...

Thomas

1 Solution

Accepted Solutions
thomaswrieck
Partner - Creator
Partner - Creator
Author

great .. thanks a lot ... that one worked for me ...

LET vNumDate = Num(Makedate(2008,1,6));

LET vStartDate = 'Num(Vehicle.CheckInDate)>=' & $(vNumDate) ;



View solution in original post

3 Replies
sunil2288
Creator III
Creator III

HI Thomas U can try

Resident

Summary WHERE Vehicle.CheckDate<''06/01/2008'' or Vehicle.CheckDate=''06/01/2008''

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, Thomas,

I would prefer to use the num-function for dates, than you don't need quotes for numbers, here the variables would be like this:

New variable for numeric date:

LET vNumDate = Num(Datefield); or LET vNumDate = Num(Makedate(2008,1,6));

LET vWhereCM = 'Num(Vehicle.CheckInDate)>=' & $(vNumDate) ;

thomaswrieck
Partner - Creator
Partner - Creator
Author

great .. thanks a lot ... that one worked for me ...

LET vNumDate = Num(Makedate(2008,1,6));

LET vStartDate = 'Num(Vehicle.CheckInDate)>=' & $(vNumDate) ;