Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I try to compare two variable in the loading script. Current time must fall within a specified time interval
My script:
let vTimeStart = '05:00am';
let vTimeEnd = '05:30am';
let curTime = time#(time((num#(Left(now(1),4))/2400),'hh:mmtt'),'HH:MMTT');
if time('$(curTime)','HH:MMTT') >= time('$(vTimeStart)', 'HH:MMTT') and (time('$(curTime)', 'HH:MMTT') <= time('$(vTimeStart)', 'HH:MMTT')) - error in this row
//some script
endif
Thanks!
hi,
try this.
Ex;
let vTimeStart = Timestamp(Timestamp#('05:00am','hh:mmtt'),'hh:mmTT');
let vTimeEnd = Timestamp(Timestamp#('05:30am','hh:mmtt'),'hh:mmTT');
let curTime = Timestamp(now(),'hh:mmTT');
if '$(curTime)' >= '$(vTimeStart)' and '$(curTime)' <= '$(vTimeStart)' then
set vCondition='True';
ELSE
set vCondition='False';
endif
let vTimeStart = time#('05:00am','hh:mmtt');
let vTimeEnd = time#('05:30am';'hh:mmtt');
let curTime = frac(now());
if $(curTime) >= $(vTimeStart) and $(curTime) <= $(vTimeEnd) then
// true
else
// false
end if;
hi,
try this.
Ex;
let vTimeStart = Timestamp(Timestamp#('05:00am','hh:mmtt'),'hh:mmTT');
let vTimeEnd = Timestamp(Timestamp#('05:30am','hh:mmtt'),'hh:mmTT');
let curTime = Timestamp(now(),'hh:mmTT');
if '$(curTime)' >= '$(vTimeStart)' and '$(curTime)' <= '$(vTimeStart)' then
set vCondition='True';
ELSE
set vCondition='False';
endif