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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Udo
Contributor III
Contributor III

Compare filetime to Now()

Hi all,

I'm a bit at loss. Trying to run a script only, if the filetime of a qvd is older then 3 hours.  

Script is: 

let vFileTime1 = FileTime('lib://path_to_my _file);

IF $(vFileTime1) < (Now()-MakeTime(3)) then

load ...

Getting this error:

The following error occurred:
Unexpected token: '3', expected one of: 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', 'OPERATOR_STRING_CONCAT', 'like', 'and', ...
 
The error occurred here:
IF 1/16/2023 >>>>>>3<<<<<<:02:37 PM > (Now()-MakeTime(3)) then
 
Thanks for your help!
Labels (1)
1 Reply
MarcoWedel
MVP
MVP

Try without dollar sign expansion:

IF vFileTime1 < (Now()-MakeTime(3)) then