Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data timestamp

I have seen reports with a box showing the data load time and date. Can someone tell me how this is done ?

Thank you.

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Now(0) is the time of the reload.

View solution in original post

14 Replies
johnw
Champion III
Champion III

Now(0) is the time of the reload.

boorgura
Specialist
Specialist

You can have a list box with the following expression:

= 'Reloaded at ' & ReloadTime()

boorgura
Specialist
Specialist

John,

I would assume both now(0) and reloadTime() are return the same.

Correct me if I'm wrong.

Not applicable
Author

Thank you, worked well

Not applicable
Author

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.

johnw
Champion III
Champion III

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.

Not applicable
Author

You are correct, apologies for my error.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Not applicable
Author

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.