On this page
Kater SQL Functions Date parts
KATER__DAY_OF_WEEK_INDEX
The day's number in its week, from 0 for Sunday to 6 for Saturday.
Family: Date parts
Syntax
KATER__DAY_OF_WEEK_INDEX(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
- On Snowflake, the account’s
WEEK_STARTsetting can change the numbers.
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_week_index', KATER__DAY_OF_WEEK_INDEX(orders.order_date)) AS "Day of Week Index"FROM kater_dataset.orders AS ordersORDER BY 1LIMIT 3| Order ID | Order Date | Day of Week Index |
|---|---|---|
| O00000 | 2025-05-26 | 1 |
| O00001 | 2025-11-28 | 5 |
| O00002 | 2025-07-25 | 5 |
Compiles to
EXTRACT(DAYOFWEEK FROM orders.order_date)DATE_PART(DAYOFWEEK, orders.order_date)