Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Please see attached screenshot. I have a variable called "vDataAsOf". I have been observing this
through my screen for the past few days. When I refreshed my document today, this variable had
"10/12/2016" as you can see in my debug screen. It should have been 10/13/2016.
This line of code doesn't always work 100%. Can anyone tell me what's wrong with this code or maybe
there's a better function to always show System Date - 1? Thanks

Default timer_mode is set to 0 and 0 means day of last finished data load.
Try this
LET vDataAsOf = Date(Today(1) - 1, 'MM-DD-YYYY');
But what's wrong with what I had? I want to understand this. Thanks
Just as an fyi - it worked yesterday.
Default timer_mode is set to 0 and 0 means day of last finished data load.
Sunny,
Thanks. When I used today(1) as you suggested, it showed 10/13/16. I will keep watching this for the next few days. I'm sure it's going to work since you (and others on this forum) have more experience than I. These QV date
functions are definitely designed very much differently than other programming languages. It's very natural for any
developers (including myself) to initially think Today() or Day() or GetDate() and subtract 1 from it to get yesterday's
day. I didn't know there are actually parameters to which you can pass.
Thanks for the above link/info.