snowflake.snowpark.functions.is_date¶
- snowflake.snowpark.functions.is_date(col: Union[Column, str]) Column [source]¶
Returns true if the specified VARIANT column contains a date value.
Examples:
>>> import datetime >>> from snowflake.snowpark.types import StructField, VariantType >>> df = session.create_dataframe([[datetime.date(2023, 3, 2), 123]], schema=["a", "b"]) >>> df.select(is_date(to_variant(df["a"])).alias("date"), is_date(to_variant(df["b"])).alias("int")).collect() [Row(DATE=True, INT=False)]