Skip to main content
Version: 0.0.1

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

{{< codeheader "DAYOFMONTH example" >}}

SELECT DAYOFMONTH(DATE '2021-02-28')
-- 28

{{< codeheader "DAYOFMONTH example" >}}

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

Usage Notes

This function is identical to the function DAY.