Dates & time Scalar

dayofmonth()

Extract the dayofmonth component from a date or timestamp

Arguments & returns

4 overloads

dayofmonth(ts)

Scalar
Overload link ts Returns
#01 DATE BIGINT
#02 INTERVAL BIGINT
#03 TIMESTAMP BIGINT
#04 TIMESTAMP WITH TIME ZONE BIGINT

Example

dayofmonth example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

In other engines

Prestoday_of_month()

DAY_OF_MONTH(timestamp '2012-08-08 01:00:00')
In DuckDB
DAYOFMONTH(CAST('2012-08-08 01:00:00' AS TIMESTAMP))

SQLGlot example ↗