
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Change Today() to a different date
I created a dashboard for a client using stale data. Many of the charts and calculations are based off of comparing Shipping and Ordering dates to the current date...today(). Is it possible to manipulate or change the date associated to today().
Thanks for you help.
- Tags:
- qlikview_scripting
Accepted Solutions

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Create a variable like below
vDate = Date(Today() - N) ///(N may be any number you want to adjust)
Now use this variable wherever you are using Today(), this way you can in one place and it reflects in multiple places.
Today() will always return the system date of your computer, if you want to change value of it you have to change date in your computer..
Hope this helps you.
Regards,
Jagan.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi jeremy
can you please explain what you want to do with an example

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
you can try Date(Date(today(), 'DD/MM/YYYY')+<Number of days to add>, 'DD/MM/YYYY').
The above just adds the number to today. So if I have +14, this will add 14 days to today. You can also subtract this

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Create a variable like below
vDate = Date(Today() - N) ///(N may be any number you want to adjust)
Now use this variable wherever you are using Today(), this way you can in one place and it reflects in multiple places.
Today() will always return the system date of your computer, if you want to change value of it you have to change date in your computer..
Hope this helps you.
Regards,
Jagan.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you explain a bit more please with some sample if possible,
-Hirish
“Aspire to Inspire before we Expire!”

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jagan,
Thanks. Yea I should have created a variable at the beginning of development and then performed all calculations based off of the variable. The problem is I already coded everything based off of using today().
Yea i was just hoping that there was some way i would be able to alter the date associated to today() so i wouldnt have to go back and change all of my expressions.
In regards to others who are asking what i'm trying to do with an example. I performing different calculations in the dashboard based on todays date. The problem is i'm working with stale data and need to change the date associated to today to let say 5/5/15. That way aging of Orders and Shipments display correctly. Appreciate the feedback. Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can create your own today date value based on your data. Get the Max date from your data and assign the value to your custom defined value.
vCustomToday --> =Max({1} DateField)
