On this page
Kater SQL Functions Date parts
KATER__HOUR_OF_DAY
The hour of its day, from 0 to 23.
Family: Date parts
Syntax
KATER__HOUR_OF_DAY(field)Arguments
| Argument | Description |
|---|---|
field | The timestamp, or a time of day. |
Returns
A whole number. The field menu writes @format plain beside it, so it shows without a thousands separator.
Usage notes
- A date has no time of day, so the compiler refuses it on a date.
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.ordered_at AS "Ordered At", DIMENSION('ordered_at_hour_of_day', KATER__HOUR_OF_DAY(orders.ordered_at)) AS "Hour of Day"FROM kater_dataset.orders AS ordersORDER BY 1LIMIT 3| Order ID | Ordered At | Hour of Day |
|---|---|---|
| O00000 | 2025-05-26T09:02:00 | 9 |
| O00001 | 2025-11-28T09:21:00 | 9 |
| O00002 | 2025-07-25T13:56:00 | 13 |
Compiles to
EXTRACT(HOUR FROM orders.ordered_at)DATE_PART(HOUR, orders.ordered_at)