You can translate the question and the replies:

Converting time zones in Denodo?

Hi, What is the equivalent for the "AT TIME ZONE" (https://docs.microsoft.com/en-us/sql/t-sql/queries/at-time-zone-transact-sql?view=sql-server-2017) function in SQL Server in Denodo? How can we convert the (default) displayed time zone of timestamps (with timezones) in Denodo. The question is for both Denodo 6 & 7.
user
17-06-2019 04:23:15 -0400

1 Answer

Hi, In order to get the equivalent format of “AT TIME ZONE” function of SQL SERVER in Denodo, I would create a Base view containing the time zone value with the datatype [“timestampz”](https://community.denodo.com/docs/html/browse/7.0/vdp/vql/language_for_defining_and_processing_data_vql/data_types/data_types_for_dates_timestamps_and_intervals#data-types-for-dates-timestamps-and-intervals) in Denodo Platform 7.0 and I would use the [i18n](https://community.denodo.com/kb/view/document/Internationalization%20configuration%20and%20dates?category=Common+Errors) configuration to change the default timezone into the desired time zone of my choice. Also, the “timestampz” datatype was one of the new features that were introduced in Denodo Platform 7.0. Hence in order to get similar results in Denodo Platform 6.0, I would create a [i18n Map](https://community.denodo.com/docs/html/browse/6.0/vdp/vql/advanced_characteristics/creating_new_internationalization_configurations/creating_new_internationalization_configurations#managing-internationalization-configurations) and change the particular ‘timezone’ while creating the i18n Map. For example, ``` CREATE or replace MAP I18N i18n_us_pst_tz( 'country' = 'US' 'datepattern' = 'MM/dd/yyyy HH:mm:ss Z' 'doubledecimalposition' = '2' 'doubledecimalseparator' = '' 'doublegroupseparator' = '' 'language' = 'en' 'timepattern' = 'DAY' 'timezone' = 'PST' ); ``` Hope this helps!
Denodo Team
18-06-2019 08:55:19 -0400
You must sign in to add an answer. If you do not have an account, you can register here