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

snowflake.snowpark.functions.to_time

snowflake.snowpark.functions.to_time(e: Union[Column, str], fmt: Optional[Column] = None) Column[source]

Converts an input expression into the corresponding time.

Example:

>>> df = session.create_dataframe(['04:15:29.999'], schema=['a'])
>>> df.select(to_time(col("a"))).collect()
[Row(TO_TIME("A")=datetime.time(4, 15, 29, 999000))]
Copy