Returns the day of month of the date or timestamp.
Last updated 2 years ago
Was this helpful?
date_timestamp_expression: A DATE or TIMESTAMP expression.
DATE
TIMESTAMP
Examples
DAYOFMONTH example
SELECT DAYOFMONTH(DATE '2021-02-28') -- 28
SELECT DAYOFMONTH(TIMESTAMP '2021-02-28 11:43:22') -- 28
This function is identical to the function .
DAY