Categories: Date/Time
DAYOFMONTH
Returns the day of month of the date or timestamp.
Syntax
DAYOFMONTH(date_timestamp_expression string) → bigint
- date_timestamp_expression: A
DATE
orTIMESTAMP
expression.
Examples
DAYOFMONTH exampleSELECT DAYOFMONTH(DATE '2021-02-28')
-- 28
SELECT DAYOFMONTH(TIMESTAMP '2021-02-28 11:43:22')
-- 28
Usage Notes
This function is identical to the function DAY
.