Skip to main content
On this page

Kater SQL Functions Date parts

KATER__DAY_OF_MONTH

The day of its month, from 1 to 31.

Family: Date parts

Syntax

KATER__DAY_OF_MONTH(field)

Arguments

ArgumentDescription
fieldThe date or timestamp.

Returns

A whole number. The field menu writes @format plain beside it, so it shows without a thousands separator.

Usage notes

  • A month has 28 to 31 days, so not every month has days 29 to 31.

Example

This Sandbox query reads the sample shop’s orders. The table shows the rows that Kater gave.

SELECT
orders.order_id AS "Order ID",
orders.order_date AS "Order Date",
DIMENSION('order_date_day_of_month', KATER__DAY_OF_MONTH(orders.order_date)) AS "Day of Month"
FROM kater_dataset.orders AS orders
ORDER BY
1
LIMIT 3
Order IDOrder DateDay of Month
O000002025-05-2626
O000012025-11-2828
O000022025-07-2525

Compiles to

EXTRACT(DAY FROM orders.order_date)
DATE_PART(DAY, orders.order_date)

See also