Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 775 Bytes

File metadata and controls

33 lines (23 loc) · 775 Bytes
description
Returns the day of month of the date or timestamp.

DAYOFMONTH

Syntax

DAYOFMONTH(date_timestamp_expression string) → bigint

  • date_timestamp_expression: A DATE or TIMESTAMP expression.

Examples

DAYOFMONTH example

{% code title="DAYOFMONTH example" %}

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

{% endcode %}

{% code title="DAYOFMONTH example" %}

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

{% endcode %}

Usage Notes

This function is identical to the function DAY.