Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have seen reports with a box showing the data load time and date. Can someone tell me how this is done ?
Thank you.
Now(0) is the time of the reload.
Now(0) is the time of the reload.
You can have a list box with the following expression:
= 'Reloaded at ' & ReloadTime()
John,
I would assume both now(0) and reloadTime() are return the same.
Correct me if I'm wrong.
Thank you, worked well
This returned the current date and time, I was looking for the data time and date which I got from another post. Thanks for your input.
Neither now(0) nor reloadtime() return the current date and time. They return the time of the reload. So I don't know what you're talking about.
Rocky, I believe they return the same timestamp, yes. In at least my current application, now(0) obeys my default timestamp formatting, and reloadtime() does not, but I'm not sure that means anything. Reloadtime() is probably better simply because what it does is more obvious, and also because QlikView has, in the past, changed what the now() parameters do, thus messing up a lot of our existing applications.
You are correct, apologies for my error.
A note on now(0). When used in the UI, now(0) and ReloadTime() both return the End TIme of the last reload. When used in script, now(0) and ReloadTime() returns the end time of the previous reload. So either will return the End Time of the reload if used in the UI.
If you want to display the Start Time of the reload, which can be more meaningful on a long reload, you have to set your own value in the script. I usuually use:
LET SCRIPT_START = now(1);
as the first line of the script.
(I reliaze the OP was asking about data time, but I wanted to add this clarification about now(0) because I've made the script vs UI mistake in the past.
-Rob
Inserting the time of the reload may not neccessarily reflect when the data itself was updated. If you are using QVD files, you may want to use a timestamp/ combination of timestamps on the QVD files instead of the time the application was reloaded.