snowflake.snowpark.functions.minute¶
- snowflake.snowpark.functions.minute(e: Union[Column, str]) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L3394-L3409)¶
Extracts the minute from a date or timestamp.
Example:
>>> import datetime >>> df = session.create_dataframe([ ... datetime.datetime.strptime("2020-05-01 13:11:20.000", "%Y-%m-%d %H:%M:%S.%f"), ... datetime.datetime.strptime("2020-08-21 01:30:05.000", "%Y-%m-%d %H:%M:%S.%f") ... ], schema=["a"]) >>> df.select(minute("a")).collect() [Row(MINUTE("A")=11), Row(MINUTE("A")=30)]