On this page
Kater SQL Functions Date grains
KATER__DATE
The date, without its time of day.
Family: Date grains
Syntax
KATER__DATE(field)Arguments
| Argument | Description |
|---|---|
field | The date or timestamp. |
Returns
A date.
Usage notes
- On a date, it gives the same date. Use it to group a timestamp by day.
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_date', KATER__DATE(orders.ordered_at)) AS "Date"FROM kater_dataset.orders AS ordersORDER BY 1LIMIT 3| Order ID | Ordered At | Date |
|---|---|---|
| O00000 | 2025-05-26T09:02:00 | 2025-05-26 |
| O00001 | 2025-11-28T09:21:00 | 2025-11-28 |
| O00002 | 2025-07-25T13:56:00 | 2025-07-25 |
Compiles to
The call compiles to the same SQL on DuckDB and on Snowflake.
CAST(DATE_TRUNC('DAY', orders.ordered_at) AS DATE)See also
- Dates
- Other functions in Date grains:
KATER__WEEK,KATER__MONTH,KATER__QUARTER,KATER__YEAR,KATER__HOUR,KATER__MINUTE,KATER__SECOND,KATER__MILLISECOND