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

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