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

ReloadTime() and now(0) not Working

I've been attempting to use the functions ReloadTIme() or now(0) which as far as I can tell are identical, to output the last successful reload time for exception reporting purposes, e.g. to warn users when the data is behind.

In my main qvws, neither function is working. Reloadtime() outputs nothing, while now(0) outputs 'day zero' (30/12/1899). I assume the only difference in outputs it due to their default formatting options.

However, I most certainly have reloaded these files many times. In other existing documents, and in new test documents on the same system (Windows Server 2012 Standard) the functions work just fine:

Testing on a newly created which has never been reloaded or saved, I still get a result for now(0) which equals its creation time, though ReloadTime() is blank:

I guessed reload method could have something to do with it, as the two main documents that don't work (first screenshot above) are running on scheduled reloads. However, testing on other scheduled documents works fine and reload times are correct.

Any ideas? My other thought is that is could be because both documents' scheduled reload happened to fail today (which is why I was looking to add the checks), but if the method doesn't work when the documents fail then it completely defeats the purpose.

1 Solution

Accepted Solutions
juraj_misina
Luminary Alumni
Luminary Alumni

Hello MikeSwinn, I'm facing the same issue with QV 11.20.12354.0409 (SR6 I believe) when using -prj folders. Once I delete -prj folders everything works fine. After creating them again reload time is lost. Seems like a bug to me.

View solution in original post

16 Replies
Not applicable
Author

Just as an aside - Now() is a server killer in my experience....

Not applicable
Author

I've heard that now(1), which is the default functionality of now() can be dangerous as it's the current system time and and refreshes every second or more frequently, so would agree with you there.

However, I wouldn't expect now(0) to affect unless it's poorly implemented, since the value must only be reset at reload time.

simenkg
Specialist
Specialist

You might be right, but I would still store it in a variable at reload time.

Let vReloadTime = now(1);

Not applicable
Author

If it's just to show the last time the app refreshed, use the Reload() direct into your expression/object.

avinashelite

Hi Mike,

As per my knowledge, 2 is the default for now() i.e. is now() and now(2) are same and 1 is the default parameter for today() function.

Colin-Albert

Exactly which version of QlikView are you using - Version, release & build number?

What result do you see if you use =reloadtime() in a text object?

Colin-Albert

According to the help, the default timer_mode for now() is 1, today() defaults to timer_mode 2.

now.jpg

Not applicable
Author

Good points about adding it to the script, seems better practice anyhow. But I still would be interested to see why the functions are not working in some cases, seems like a bug to me.

@Colin:

Version is:

When I add reloadtime() to a text object in the documents where it wasn't working, the behaviour is the same, is shows up as blank, and now(0) in such documents as 30/12/1899 00:00:00

Colin-Albert

Is your reload using the standard server schedule or something else?

If a reload fails the document should remain "as-is" and retain the reload time from the last successful reload