Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
morenoju
Partner - Specialist
Partner - Specialist

Today() returning yesterday's date

Hi all,

Today is 22nd November. I've checked the date in the PC is right and I've just done a data load.


For some reason, Today() is returning yesterday. I've used KPIs and they show the following:

Today()=11/21/2017 (yesterday)

Today(0)=11/22/2017 (today)

Now()= 11/22/2017 1:51:13 PM


Do you know what may be happening? I can change all my dashboards to use Today(0) instead of Today() but I'm curious about what could be the issue.


Thanks,


Juan

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

There are three timer modes available for today().

today - script and chart function ‒ Qlik Sense

And although the doc does not say it, I believe the default is "2 - date the document was opened".  Does that fit with what you are seeing? 

-Rob

morenoju
Partner - Specialist
Partner - Specialist
Author

Today(2) is returning the same as Today(), yesterday's day.

I wonder what "date the document was opened" means, since I just went to the hub, opened the app again and the date didn't change to today.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The default if omitted is "2", date opened.  The first person to hit the app will "open" the app. It will remain open and in memory until it's either replaced by an updated version or the server needs to unload it.  So it sounds like this one was opened yesterday?

-Rob

ishanbhatt
Creator II
Creator II

Hi Juan,

Today(0) - It gives app last reloaded date. So, On today you already reloaded your app that's why it gives 11/22/2017.

Today() - It gives current day date. For this check your Script formats and your device date.

- Ishan