I have a column of type TIMESTAMP_NTZ
and it contains timestamp that I know are on UTC timezone. Mainly I want to convert to TIMESTAMP_TZ
because I have other columns that are TIMESTAMP_TZ
and I want to be able to do operations involving both.
I've tried to generate a TIMESTAMP_TZ
in the following ways:
SELECT
'2019-10-24 12:07:24.000'::timestamp_ntz as orig -- a literal timestamp_ntz
,convert_timezone('UTC', 'UTC', orig) -- the 3-args version of convert_timezone will always return a TIMESTAMP_NTZ
,convert_timezone('UTC', orig) -- the 2-args assumes that orig timezones is session's current timezone
;
Just to be clear I want to convert 2019-10-24 12:07:24.000
to 2019-10-24 12:07:24.000 +0000
Is there any function or operator in Snowflake that allows me to say treat this TIMESTAMP_NTZ
as TIMESTAMP_TZ
in timezone X?