Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikBeginner1
Creator
Creator

Date Variable

Hello,

LET vReloadDate = Date(ReloadTime(),'DD/MM/YYYY');

I have this variable stored in my app.

I have a number of flags for a report I am building, and I am trying to use the Date(ReloadTime(),'DD/MM/YYYY') as a variable in my load editor, but the results differentiate to when I use a hardcoaded Date(ReloadTime(),'DD/MM/YYYY'). Please see examples below,

 IF(Date(ZMEffectiveDate,'DD/MM/YYYY') > '$(vReloadDate)' ,0,1) as ZMBBNIVAL01, - This is what I tried when using the variable above.

 IF(Date(ZMEffectiveDate,'DD/MM/YYYY') > Date(ReloadTime(),'DD/MM/YYYY'),0,1) as ZMBBNIVAL01, - This is when I hardcoded the Reload time instead of using the variable. The results shown from this is correct.

 

The reason why I am trying to use as a variable, is because I want to add functionality where the user is able to amend the date which will change the results of the report if they would like to see past history.

Any understanding into why the variable is not working correctly? 

Thanks in advance,

1 Reply
JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @QlikBeginner1 , have you tried initializing your variable with SET instead of LET?

And in case of LET, you can try:

IF(Date(ZMEffectiveDate,'DD/MM/YYYY') > '$(=vReloadDate)' ,0,1) as ZMBBNIVAL01

Please, pay attention to the equal sign.

JG