snowflake.snowpark.functions.as_date¶

snowflake.snowpark.functions.as_date(variant: Union[Column, str]) → Column[source]¶

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