description |
---|
Returns the day of month of the date or timestamp. |
- date_timestamp_expression: A
DATE
orTIMESTAMP
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 %}
This function is identical to the function DAY
.