Skip to main content
Version: 24.3.x

Categories: Date/Time

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 Samples."samples.dremio.com"."SF_incidents2016.json"
LIMIT 3
-- Date, EXPR$1
-- 2016-01-29, 29
-- 2016-01-29, 29
-- 2016-04-25, 25

Usage Notes

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