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: 
don_qlikview
Creator
Creator

How to Load files based on system time??

Hello,

I have multiple files to load during the entire day and I want to load the files based on the system time. For example if the system time is >8:30:00 AM and <8:45:00 AM the Load A,B,C From ABC.xlsx else if the system time is >9:00:00 AM and <9:15:00 AM then Load A,B,C from DEF.xlsx. How can I do this? if anyone can help that will be great!!!

Thanks,
Don

Labels (1)
1 Solution

Accepted Solutions
maxgro
MVP
MVP

schedule every 15 (?) minutes

let time = time#(frac(now()));

let starttime = Time#(23/24);

let endtime = Time#(23/24 + 50/60/24);

if ( $(time)>=$(starttime) and $(time)<=$(endtime) ) then

  trace GO ???;

ENDIF;

let str = time($(time),'hh:mm') & ' start=' & time($(starttime),'hh:mm') & ' end=' & time($(endtime),'hh:mm');

trace $(str);

let starttime = Time#(8/24 + 30/60/24);

let endtime = Time#(8/24 + 45/60/24);

if ( $(time)>=$(starttime) and $(time)<=$(endtime) ) then

  trace GO load ABC;

ENDIF;

let str = time($(time),'hh:mm') & ' start=' & time($(starttime),'hh:mm') & ' end=' & time($(endtime),'hh:mm');

trace $(str);

let starttime = Time#(9/24 + 0/60/24);

let endtime = Time#(9/24 + 15/60/24);

if ( $(time)>=$(starttime) and $(time)<=$(endtime) ) then

  trace GO load DEF;

ENDIF;

let str = time($(time),'hh:mm') & ' start=' & time($(starttime),'hh:mm') & ' end=' & time($(endtime),'hh:mm');

trace $(str);

1.png

View solution in original post

1 Reply
maxgro
MVP
MVP

schedule every 15 (?) minutes

let time = time#(frac(now()));

let starttime = Time#(23/24);

let endtime = Time#(23/24 + 50/60/24);

if ( $(time)>=$(starttime) and $(time)<=$(endtime) ) then

  trace GO ???;

ENDIF;

let str = time($(time),'hh:mm') & ' start=' & time($(starttime),'hh:mm') & ' end=' & time($(endtime),'hh:mm');

trace $(str);

let starttime = Time#(8/24 + 30/60/24);

let endtime = Time#(8/24 + 45/60/24);

if ( $(time)>=$(starttime) and $(time)<=$(endtime) ) then

  trace GO load ABC;

ENDIF;

let str = time($(time),'hh:mm') & ' start=' & time($(starttime),'hh:mm') & ' end=' & time($(endtime),'hh:mm');

trace $(str);

let starttime = Time#(9/24 + 0/60/24);

let endtime = Time#(9/24 + 15/60/24);

if ( $(time)>=$(starttime) and $(time)<=$(endtime) ) then

  trace GO load DEF;

ENDIF;

let str = time($(time),'hh:mm') & ' start=' & time($(starttime),'hh:mm') & ' end=' & time($(endtime),'hh:mm');

trace $(str);

1.png