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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

variable with timestamp

let lastexectime = '3/1/2017 10:00:00 AM';

load

*

FROM
[$(DATA_FilePath)$(DATA_FileName)]
(
ooxml, embedded labels) where  [Modified Date] > '$(lastexectime)' ;

When I used the condition where  [Modified Date] > $(lastexectime) without the quotes it throws an error stating garbage value but when I put quotes for the variable it works fine. Can anybody please explain why it works with quotes when $ is already present

15 Replies
cwolf
Creator III
Creator III

to get it as number:

let lastexectime  =  num(date(ReloadTime()));

Anonymous
Not applicable
Author

Modifed date saves value as 3/1/2017  10:45:00 AM

Miguel_Angel_Baeyens

Are there two spaces there between the date part and the time part or is that me?

Anonymous
Not applicable
Author

Thanks..it worked..I was missing out the num function while comparing it..

Anonymous
Not applicable
Author

Christian provided a solution that worked ..

He suggested to use let lastexectime  =  num(date(ReloadTime())); and keep the rest of the script as it is.

Thanks for your help..Explanation provided earlier with quotes has been very helpful indeed.

Miguel_Angel_Baeyens

Right, because you are using the LET function. You can also use the SET if you are hardcoding the date instead of using the function.


Good luck!