description |
---|
Returns the day of month of the date or timestamp. |
- date_timestamp_expression: A
DATE
orTIMESTAMP
expression.
Examples
{% code title="DAY example" %}
SELECT "DAY"('2003-02-01 11:43:22')
-- 1
{% endcode %}
{% code title="DAY example" %}
SELECT "Date", "DAY"("Date")
FROM eth.recent_blocks
LIMIT 3
-- Date, EXPR$1
-- 2016-01-29, 29
-- 2016-01-29, 29
-- 2016-04-25, 25
{% endcode %}
The function name is a Spice keyword and must be enclosed in double quotes ("DAY"
). This function is identical to the function DAYOFMONTH
.