Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to read a table within the last week, I am looking for something like:
LET vStartdate = '01.05.2015';
LET vEnddate = '08.05.2015';
LOAD CreatedAt WHERE CreatedAt >= $(vStartdate) AND CreatedAt <= '08.05.2015';
---------------------------
Return of terminal was that the error was here:
LOAD CreatedAt WHERE CreatedAt >= 01.05.2015 AND CreatedAt <= '08.05.2015'
I found this, but I am not sure how to fix it:
The cause is that $(vStartdate) returns a string. The result is that you compare a numeric month value (because of the >= operator) with a string value. By changing the variable so that it return a number it's possible to use the >= and <= operators. To make the first part of the chart expression work I changed the modifier so it works with the number value of the variable.
Please help. Thank you in advance.
Try these:
LET vStartdate = num(date#('01.05.2015','DD-MM-YYYY);
LET vEnddate = num(date#('08.05.2015','DD-MM-YYYY);
Or
LET vStartdate = num(makedate(2015,5,1));
LET vEnddate = num(makedate(2015,5,8));
Try these:
LET vStartdate = num(date#('01.05.2015','DD-MM-YYYY);
LET vEnddate = num(date#('08.05.2015','DD-MM-YYYY);
Or
LET vStartdate = num(makedate(2015,5,1));
LET vEnddate = num(makedate(2015,5,8));
Wow that was fast!
2nd worked. Perfect. Many Thanks.