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

snowflake.snowpark.functions.as_date

snowflake.snowpark.functions.as_date(variant: ColumnOrName) 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