How to Use DATE_TRUNC in BigQuery

Last updated July 26, 2026 · By the SaturnSQL team

DATE_TRUNC(date, unit) rounds a date down to the start of its week, month, quarter, or year, the standard way to group a time series by period.

SELECT DATE_TRUNC(order_date, MONTH) AS order_month,
       SUM(order_total) AS revenue
FROM orders
GROUP BY order_month
ORDER BY order_month;

Grouping by week

WEEK truncates to the most recent Sunday by default. Pass WEEK(MONDAY) if your reporting weeks should start on Monday instead.

SELECT DATE_TRUNC(order_date, WEEK(MONDAY)) AS order_week,
       COUNT(*) AS orders
FROM orders
GROUP BY order_week
ORDER BY order_week;

DATE_TRUNC works on DATE values; for TIMESTAMP or DATETIME columns use TIMESTAMP_TRUNC or DATETIME_TRUNC instead, they take the same units.

Run this in SaturnSQL

SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.

Try it free

Related BigQuery guides