Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reload Time

I have various qvds building the datamodel. I need to know the reload times of these qvds and I am using the expression ,

For instance for qvd1:

QVD1_ReloadTime:

load ReloadTime() as QVD1_Reload_Time

AutoGenerate 1;

STORE QVD1_ReloadTime into D:\QlikStorage\DataMart\ReloadTime\QVD1_ReloadTime.QVD (QVD);

But this script is not giving me the right reload date.

For instance I reloaded on 5/28/2014 and it gives a date 5/27/2014 and the different qvds reload dates are different even though they ran on the same day.

Any thoughts?

6 Replies
its_anandrjs
Champion III
Champion III

This is strange but i suggest if you use variables for this

QVD1_ReloadTime:

load ReloadTime() as QVD1_Reload_Time

AutoGenerate 1;

Let vReloadtime = ReloadTime();

STORE QVD1_ReloadTime into D:\QlikStorage\DataMart\ReloadTime\QVD1_ReloadTime.QVD (QVD);

Anonymous
Not applicable
Author

The ReloadTime() function is inconsistent, and may work differently depending on QV version.  It may return the time of the previous reload.  Try using now():

QVD1_ReloadTime:

load now() as QVD1_Reload_Time

AutoGenerate 1;

maxgro
MVP
MVP

LET START = now(1);

load

.....;

LET END = now(1);

LET ELAPSED = Interval('$(END)' - '$(START)');

trace ********** $(START);

trace ********** $(END);

trace ********** $(ELAPSED);

PradeepReddy
Specialist II
Specialist II

As suggested by Michael, use Now() instead of ReloadTime()

From the help...

Now() : Returns a time stamp of the current time from the system clock. i.e current statement execution time.

Reloadtime() : Returns a time stamp for when the script last finished re-executing.

its_anandrjs
Champion III
Champion III

I suggest Now( ) is better way to do that you can load your table with the Now() function and as well as for table name also with load of each table

Table1:

Load *

From Location;

ReloadDetails:

LOAD Now() as ReloadTime,

'Table1' as TableFlag

AutoGenerate 1;

Table2:

Load *

From Location;

ReloadDetails:

LOAD Now() as ReloadTime,

'Table2' as TableFlag

AutoGenerate 1;

//And at the end store the QVD

STORE ReloadDetails into D:\QlikStorage\DataMart\ReloadTime\ReloadDetails.QVD (QVD);



dharmarasu
Creator
Creator

Hi,

try this...

LET Starttime =Now();

Load * from table

LET Endtime =Now();

Regards,

Dharma