Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using variables in Load...am having some questions

Hello,

I am using the below script

MaxKeyLoad:


load Date(max(RUN_DATE),'YYYY-MM-DD') as MaxID
from
V_ETL_HISTORY_EXECUTION.qvd (qvd);

Let MaxID=peek('MaxID',0,MaxKeyLoad);

Let MaxID2=Date($(MaxID),'YYYY-MM-DD');

when i use $(MaxID), it gives the correct date

but since i have used the date value of MaxID into MaxID2, the MaxID2 is not giving the correct date and it shows something like 1905-06-07

Now my question is, can we use the value of one variable into another variable in the script?

-br

Arif

1 Reply
johnw
Champion III
Champion III

I'm going to guess that you need this instead:

LET MaxID2 = date(MaxID,'YYYY-MM-DD');

If it doesn't work, I can take a closer look.