You are viewing documentation about an older version (1.12.1). View latest version

snowflake.snowpark.functions.is_timestamp_ltz

snowflake.snowpark.functions.is_timestamp_ltz(col: Union[Column, str]) Column[source]

Returns true if the specified VARIANT column contains a TIMESTAMP_LTZ value to be interpreted using the local time zone.

Example:

>>> from snowflake.snowpark.functions import to_variant, is_timestamp_ltz
>>> 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_ltz(to_variant("timestamp_ntz1")).as_("a"),
...           is_timestamp_ltz(to_variant("timestamp_ltz1")).as_("b"),
...           is_timestamp_ltz(to_variant("timestamp_tz1")).as_("c")).collect()
[Row(A=False, B=True, C=False)]
Copy