Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Daylight saving

Hi,

I would like to implement the below functionality.

I will have the list box which will show all the timezones. Based on the user selection all the datefeilds in the document has to get changed to the selected Timezone.Also it should work with relevant to the Daylight savings.

Since there are customers from different Timezones and it is very difficult to maintain seperate instance for each customer. We need to go by this way.

7 Replies
Not applicable
Author

Hi,

Maybe you can use the following expression:

ConvertToLocalTime(DateField, 'GMT-05:00')

The second parameter will be the user's selected value.

I hope it helps you.

Regards.

Not applicable
Author

Thanks Miguel.

but i have the concern . How to take care of the daylight saving. if we are able to call the windows timezone. Your solution will work perfectly with daylight saving.........

Any idea on possiblity of calling the windows Timezone............

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

ConvertToLocalTime handles DST by default. See ConvertToLocalTime function in the Ref Guide or the Help.

-Rob

Not applicable
Author

Hi,

Rob's answer is right, you can use ConverToLocalTime(DateField) and it'll return the data based on the windows timezone, but, there is a problem, if you have the file in a server, it will get the windows server time zone for all connected users.

Regards.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I was referring to the thrid parm "ignore_dst".

ConvertToLocalTime( timestamp [, place [, ignore_dst=false]]])

You still need to specify the place.

ConvertToLocal(timestamp, 'GMT-5:00')

will convert the timestamp to GMT-5:00 and take into account whether timestamp falls into a DST range.

-Rob







Not applicable
Author

Thanks Rob,

Would like to know is there any other option to implement this TimeZone(i.e locale). Since we have multiple customers and they are in different timezone. Would like to go with single server.But how to manage the timezone?????

Any idea to solve the problem

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think the default timezone is always the server. So you might try setting a variable onopen to the client's timezone like suggested in this wiki:

http://community.qlik.com/wikis/qlikview-wiki/how-to-get-date-format-from-the-user-machine.aspx

-Rob