Skip to main content

DAYOFMONTH

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 or TIMESTAMP expression.

Examples

DAYOFMONTH example
SELECT DAYOFMONTH(DATE '2021-02-28')
-- 28
DAYOFMONTH example
SELECT DAYOFMONTH(TIMESTAMP '2021-02-28 11:43:22')
-- 28

Usage Notes

This function is identical to the function DAY.