snowflake.snowpark.functions.is_date¶
- snowflake.snowpark.functions.is_date(col: Union[Column, str]) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L4555-L4568)¶
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)]