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

snowflake.snowpark.functions.dayofyear

snowflake.snowpark.functions.dayofyear(e: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L4476-L4490)

Extracts the corresponding day (number) of the year 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")]],
...     schema=["a"],
... )
>>> df.select(dayofyear("a")).collect()
[Row(DAYOFYEAR("A")=122)]
Copy
Language: English