snowflake.snowpark.functions.dayofmonth

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

Extracts the corresponding day (number) of the month 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(dayofmonth("a")).collect()
[Row(DAYOFMONTH("A")=1)]
Copy
语言: 中文