Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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.
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
Paul,
See if it is different if use today(1) or today(2).
Regards,
Michael
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.
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.
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