Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview Today() function/system clock wrong?

Hi all,

I'm getting an error which I'm sure is user provoked and simple to fix. That being said, it's still pretty strange - I'm testing a calculation for the number of years/days until I reach a specific date using the Today() function. On my machine, today is 6/19, but the Today() function is returning 6/17. Any reason why this would be the case?

Capture.PNG

1 Solution

Accepted Solutions
Not applicable
Author

I bet you work on a server.

You did not close QlikView since 6/17, that's why. Today() reports QlikView open date, not system date.

View solution in original post

5 Replies
Not applicable
Author

Hmm that "Today" column is simply an expression with the function: Today() in it (I added this for debugging to see what it would output). The place where I actually plan on doing the difference calculation is in the load script (which I currently do), but from what I've been testing, it doesn't matter if I use the loaded field or calculate the difference in an expression; it's always off by 2 days.

-Paul

Anonymous
Not applicable
Author

Paul,

See if it is different if use today(1) or today(2).

Regards,

Michael

Not applicable
Author

I bet you work on a server.

You did not close QlikView since 6/17, that's why. Today() reports QlikView open date, not system date.

Anonymous
Not applicable
Author

That's why I asked to try different modes :-).  Here it is:

Returns the current date from the system clock. The timer_mode may have the following values:

0 Date at script run
1 Date at function call
2 Date when the document
was opened  

Default timer_mode is 2. The timer_mode = 1 should be used with caution, since it polls
the operating system every second and hence could slow down the system.

Not applicable
Author

Thanks guys! Yes - I do work on a server. I was unsure of how the Today() function was calculated - and now I know! This is helpful for future reference.


Cheers,

Paul