---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/date-trunc.md
cuppy_section: docs
cuppy_doc: 4F7A-BP7C
cuppy_doc_uuid: 4060f870-2ad4-452e-b90c-4c7dbaea9498
cuppy_permalink: https://cuppy.io/salesforce/d/4F7A-BP7C
cuppy_version: 1
cuppy_updated: 2026-10-23T16:16:52.575Z
cuppy_canonical: https://cuppy.io/salesforce/docs/reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/date-trunc
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: 887ec7058c2910a63b1ac297239fc151bd92c35889efb6bc212a8609d84c0f23
# cuppy_body_sha256 is over the document body ALONE, excluding both generated blocks.
---

> Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/date-trunc.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.

## `DATE_TRUNC`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Truncates a timestamp, timestamptz, or interval to a specified precision, such as hour, day, or month.

*   `<field>`: The precision to truncate to. Sets all lower-order fields to zero, or to one for day and month.

Valid values: `microseconds`, `milliseconds`, `second`, `minute`, `hour`, `day`, `week`, `localized_week`, `fiscal_week`, `month`, `fiscal_month`, `quarter`, `fiscal_quarter`, `year`, `fiscal_year`, `decade`, `century`, and `millennium`.

*   `<source>`: The value to truncate.

Valid values: `timestamp`, `timestamptz`, or `interval`. `DATE_TRUNC` casts values of type `date` and `time` to `timestamp` or `interval`, respectively.

*   `<time_zone>`: The time zone to truncate with respect to. Applies only to `timestamptz` input. By default, `DATE_TRUNC` uses the current time zone.
*   `<fiscal_option>`: A fiscal calendar option that defines the start date of the fiscal calendar. `<source>` must be of type `date`, `timestamp`, or `timestamptz`, and `<field>` must be `fiscal_week`, `fiscal_month`, `fiscal_quarter`, or `fiscal_year`. See [Fiscal Calendar Options](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/fiscal-calendar-options.html).
*   `first_day_of_localized_week => <value>`: A localized week option that defines the start of a week. `<source>` must be of type `date`, `timestamp`, or `timestamptz`, and `<field>` must be `localized_week`. See [Localized Week Options](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/localized-week-options.html).

Returns a `timestamp`, `timestamptz`, or `interval` value that matches the type of the source.

*   `<source>` can’t be of type `interval` when `<field>` is `week`, because a month can contain a fractional number of weeks.
*   You can’t provide a time zone with `timestamp` or `interval` input.
*   With `timestamptz` input, `DATE_TRUNC` truncates with respect to a time zone. For example, truncating to `day` produces the value that is midnight in that zone.

These examples assume the local time zone is `America/New_York`.

Returns `2001-02-16 20:00:00`.

Returns `2001-01-01 00:00:00`.

Returns `3 days 02:00:00`.

Returns `2001-02-16 00:00:00-05`.

Returns `2001-02-01 00:00:00`.

*   [EXTRACT and date_part](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/extract.html)
*   [Fiscal Calendar Options](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/fiscal-calendar-options.html)
*   [Localized Week Options](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/localized-week-options.html)
*   [Date/Time Functions and Operators](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/datetime-func.html)


---
<!-- cuppy -->
You are reading one file. The same content is free over MCP at https://cuppy.io/mcp with no signup: ranked search across all 376 documents in this hub, the merged view when you work in a layer, known workarounds matched to the error you hit, and depth control so you spend tokens on what you need. Start with the `_hello` tool. How to connect: https://cuppy.io/salesforce/ Something wrong in this document? Report it with the `session feedback` tool on the same endpoint.
<!-- /cuppy -->
