snowflake.snowpark.functions.as_date

snowflake.snowpark.functions.as_date(variant: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/functions.py#L7342-L7357)

Casts a VARIANT value to a date.

Example::
>>> df = session.sql("select date'2020-1-1'::variant as a")
>>> df.select(as_date("a").alias("result")).show()
--------------
|"RESULT"    |
--------------
|2020-01-01  |
--------------
Copy
Language: English