Discussion Board for collaboration related to QlikView App Development.
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)
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.
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.
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?
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.
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?
Create a textfile with:
set var = "ConvertToLocalTime(ReloadTime(),'Eastern Time (US & Canada)')";
store it as X.txt
anywhere within your script (usually within a preparing-tab at the beginning)
and then you could use:
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.
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)')
=$(var) i.e the approach you suggested.
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!
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)
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