DAY

Returns the day of month of the date or timestamp.

Syntax

DAY(date_timestamp_expression string) → bigint

  • date_timestamp_expression: A DATE or TIMESTAMP expression.

Examples

DAY example
SELECT "DAY"('2003-02-01 11:43:22')
-- 1
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

Usage Notes

The function name is a Spice keyword and must be enclosed in double quotes ("DAY"). This function is identical to the function DAYOFMONTH.

Last updated