snowflake.snowpark.functions.is_timestamp_tz¶
- snowflake.snowpark.functions.is_timestamp_tz(col: Union[Column, str]) Column [source]¶
Returns true if the specified VARIANT column contains a TIMESTAMP_TZ value with a time zone.
Example:
>>> from snowflake.snowpark.functions import to_variant, is_timestamp_tz >>> df = session.sql("select to_timestamp_ntz('2017-02-24 12:00:00.456') as timestamp_ntz1, " ... "to_timestamp_ltz('2017-02-24 13:00:00.123 +01:00') as timestamp_ltz1, " ... "to_timestamp_tz('2017-02-24 13:00:00.123 +01:00') as timestamp_tz1") >>> df.select(is_timestamp_tz(to_variant("timestamp_ntz1")).as_("a"), ... is_timestamp_tz(to_variant("timestamp_ltz1")).as_("b"), ... is_timestamp_tz(to_variant("timestamp_tz1")).as_("c")).collect() [Row(A=False, B=False, C=True)]