Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Manish
Creator
Creator

Reloadtime() as per the location of the users in Qlik sense dashboard

Hi All

I have a developed the Qlik sense dashboard where I am showing the last refreshed datetime using Reloadtime().

The problem is that it is showing time as per the Qlik Sense server location but my requirement is it should show datetime as per the location of the user. For example if the user is in India then datetime should be in IST, if the user is in London then datetime should be in GMT etc. etc.

I tried using converttolocaltime() but I think, I need to specify the timezone and my users are in more than one timezone.

 

Labels (2)
5 Replies
Frank_S
Support
Support

Try this formula using UTC time. Make sure to ensure the GMT time value for your time zone.

For US Canada Pacific it is as you see it below:

 

ConvertToLocalTime(UTC(), 'GMT-08:00')

Result: Taken at the time indicated in the image below:

Frank_S_0-1723485334713.png

Kind regards...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Manish
Creator
Creator
Author

Hi @Frank_S 

Many thanks for your reply. Just a quick one, For my time zone which is IST below is giving the correct local time but will it also give the correct local time say for the user who is in North America?

ConvertToLocalTime(UTC(),'GMT+05:30')

I just need that whenever users open the dashboard on Hub from their respective region they should see Last refresh date time as per their local time . NA user should see NA local time , India user should see India local time and so on and so forth.

Can this be done?

 

 

Frank_S
Support
Support

The backend qlik engines are in the QlikCloud and as such use UTC.

 

As as suggestion, you may wish to add additional text and image objects as I've shown above (as an example of just one timezone)  that contain different time zones that you wish to show. (perhaps 3 objects: 1 for IST, 1 for AEST, 1 for CET).

 

There is no known built syntax/feature for conditionally recognizing the locations/timezone in which the user is accessing the Qlik Cloud tenant from.

 

Please write a feature request here to submit that  idea as a feature request.

 

Ideas | Qlik Community

 

Kind regards...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Digvijay_Singh

Any possibility if you can identify location based on logged in user by using OSUser(), somehow if you can build associated location data for logged in users, it might help to build the required logic. Just giving some thought, might not work in your situation...

Frank_S
Support
Support

@Manish 
I found another way that may work for you.

It's not using local time but this will tell you how many minutes ago that the last reload took place.

So this way, if that's all you need to know how many minutes ago the the last reload took place, this should be a good workaround.

 

=(localtime() - Reloadtime() ) *1440

 

where 1440 are the number of minutes in a day.

Frank_S_1-1723580015875.png

Reloaded x minutes ago.png

Change the format pattern to #,##0 so to remove the decimal points.

So this way you have 'how many minutes ago' as to when the last reload took place, regardless of which time zone your end users are viewing from.

Hope this works for you...

Kind regards.

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!