On this page
Kater SQL Functions Date parts
KATER__QUARTER_OF_YEAR
The quarter's number, from 1 to 4.
Family: Date parts
Syntax
KATER__QUARTER_OF_YEAR(field)Arguments
| Argument | Description |
|---|---|
field | The date or timestamp. |
Returns
A whole number. The field menu writes @format plain beside it, so it shows without a thousands separator.
Usage notes
- January to March is quarter 1. It is the calendar quarter, not a fiscal quarter.
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_quarter_of_year', KATER__QUARTER_OF_YEAR(orders.order_date)) AS "Quarter of Year"FROM kater_dataset.orders AS ordersORDER BY 1LIMIT 3| Order ID | Order Date | Quarter of Year |
|---|---|---|
| O00000 | 2025-05-26 | 2 |
| O00001 | 2025-11-28 | 4 |
| O00002 | 2025-07-25 | 3 |
Compiles to
EXTRACT(QUARTER FROM orders.order_date)DATE_PART(QUARTER, orders.order_date)