Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Convert ReloadTime to EST Timezone

Hi All,

I wanted to display the reloadtime on my UI application and I am currently using ReloadTime() function for this purpose which works fine on my local machine but the issue is the Qlikview servers are in Central TimeZone and on the UI application the time is being displayed in Central time.

Can you please suggest a method that displays the reloadtime() in EST on the UI application irrespective of where the Qlikview servers are located (CST, MST, PST or may be in Europe)

9 Replies
marcus_sommer

Take a look to: ConvertToLocalTime() or adjust it manually with something like: timestamp(reloadtime() + (1/24*3) in the case that you have a positive offset of 3 hours.


- Marcus

thevingo
Creator
Creator

Hi

We had same requirement, I think manually works like charm but you need to know in advance the exact time-difference. In case of functions I'm not sure how they behave, in our case not as expected.

Anonymous
Not applicable
Author

Hi Marcus,

I tried using ConvertToLocalTime(ReloadTime(),'Eastern Time (US & Canada)') but it is not working as expected. I think the manual solution might work but as Govind mentioned we need to know the time-difference in advance. I don't want to update all my applications when there is a server move in future. Is there any other solution to resolve this issue?

marcus_sommer

Maybe your choosen time-zone isn't the right one - in general or because the server is placed within this zone but used a different one or used special summer/winter-time settings or something similar.

To avoid expensive maintaining by any change in the time-zones in the future you could put the time-zone or maybe the whole expression within a centralized include-variable: The $(Include) which you $(Must_Include) into your toolkit.

- Marcus

Anonymous
Not applicable
Author

I am not quite sure how the server settings has been set but can you please elaborate on how the solution can be achieved using timezone() or $(Include) variable?

marcus_sommer

Create a textfile with:

set var = "ConvertToLocalTime(ReloadTime(),'Eastern Time (US & Canada)')";

store it as X.txt

then using:

$(Must_include=X.txt)

anywhere within your script (usually within a preparing-tab at the beginning)

and then you could use:

$(var)

as expression whereever you want. If you put the include-variable and the $(var) in all your applications you could change the output by all application just by changing the text-file.

- Marcus

Anonymous
Not applicable
Author

Hi Marcus,

I am still seeing the same results even after using the approach you suggested. Basically I reloaded my application at today at 12:50:55 PM EST but I get the same results when I use one of the following approaches:

=converttolocaltime(reloadtime(),'Eastern Time (US & Canada)')

or

=converttolocaltime(reloadtime())


or

=$(var) i.e the approach you suggested.

EST.JPG

The weird part is the time being displayed is four hours behind the reload time.

Let me know if I am missing anything here. Thanks for your help!

marcus_sommer

I think it is reverse - if your server is in this time-zone and you in are different you need to put your time-zone reference within the converttolocaltime(). Whereby if you know the offset is 4 hours you could just do it manually with:

timestamp(reloadtime() + (1/24*4)

- Marcus

gopinadhpindra
Contributor II
Contributor II

let vUTC = timestamp(UTC(),'MM/DD/YYYY hh:mm:ss');

let vIST = timestamp(ConvertToLocalTime(Timestamp#('$(vUTC)','MM/DD/YYYY hh:mm:ss'),'Europe'),'MM/DD/YYYY hh:mm:ss TT');

Try this krishna,hope it will works