Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

Problem with a time_controlled LOAD

Hi,

in short, my issue is that I have a code that runs fine for the scenarios I already have, but for a new one (exact same structure), the exact same code produces an error.

The only line in my code where I can imagine that happening - I've had difficulties with that in the past - is a bit where I specify that

>>> NOW(0) > '11:00:00' <<<

That is part of a WHERE condition in a LOAD - I want to execute the LOAD only once a day, after 11am (the app where this code is located is reloaded every 3hrs, that's why I need this).

In the past, I always got this to work somehow - it's part of a historization_code that has been running for quite a while now.
<=> In a new bit I just added yesterday and which doesn't work yet, I edited this to

>>> FRAC(NOW(0)) > '11:00:00' <<<

and that seems to work?

I just wonder why.

Maybe someone can spot a general error here? The code is doing the exact same thing for four different tables and I'd just like it to be the same code in all four places.

Thanks a lot!

Best regards,

DataNibbler

3 Replies
Not applicable

Curious to use 0 as argument. Refenrece manuel says for Now() function:

0 Time at previously finished reload (not currently ongoing reload)

Fabrice

alexandros17
Partner - Champion III
Partner - Champion III

I think that there is a problem with the two elements you are comparing;

Now(0) returns a date-time while you write only the hour so frac takes the fractionary (probably the hour minute and seconds) and so everithing works

datanibbler
Champion
Champion
Author

Hi Alessandro,

it seems to be working now. Curious, it worked (and works) fine for the other instances.

@ Fabrice

You're right. I actually need the current time (during the current reload). What parameter would I have to use there? I can't actually find that in the list. Is the app opened when it's automatically being reloaded by the Server?

Curiously, though, as I say, it works fine, so I'd rather not edit around too much without exactly knowing why.

Thanks a lot!

Best regards,

DataNibbler