snowflake.snowpark.functions.to_time¶

snowflake.snowpark.functions.to_time(e: Union[Column, str], fmt: Optional[Union[Column, str]] = 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