I have a date column whose timezone can be identified in another column(Transaction_Date_TZ) and i want to convert the date to PST timezone.
None of the date time functions are working like ENT.LOG_TMSTMP. Could you please help me with this conversion.
We are on Terdata 16 version.
You need to translate your time zone abbreviation string to one of the supported time zone strings using a CASE,e.g.:
,Transaction_Date AT CASE Transaction_Date_TZ WHEN 'UTC' THEN 'GMT' WHEN 'BRT' THEN 'America Brazil' WHEN 'MDT' THEN 'America Mountain'
Of course this CASE is a perfect candidate for a SQL UDF -)
Thank you for the response.
Is there any dynamic way other than Case statement. timezone values are not limited to the mentioned above, it can be one of any valid timezone like AET,EET,IST etc..
But the possible list of time zones is limited and fixed, thus easily implemented as CASE.