Skip to main content
On this page

Kater SQL Functions Date grains

Date grains

A grain gives the start of the period that a date falls in, so rows group by day, week, month, quarter or year.

The Timeframe menu writes them. See Dates.

FunctionWhat it does
KATER__DATEThe date, without its time of day.
KATER__WEEKThe first day of the week the date is in.
KATER__MONTHThe first day of the month the date is in.
KATER__QUARTERThe first day of the quarter the date is in.
KATER__YEARThe first day of the year the date is in.
KATER__HOURThe start of the hour the timestamp is in.
KATER__MINUTEThe start of the minute the timestamp is in.
KATER__SECONDThe start of the second the timestamp is in.
KATER__MILLISECONDThe start of the millisecond the timestamp is in.