`DATE_TRUNC`
Data 360 Query Guide, mirrored from developer.salesforce.com: **Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API
markdownreferencev14F7A-BP7Cguide: data-cloud-query-guidestage: referencetrust: officialsource: developer.salesforce.comservice: data360interface: sql`DATE_TRUNC`Data 360Data CloudData 360 Query Guide
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 totimestamptzinput. By default,DATE_TRUNCuses the current time zone.<fiscal_option>: A fiscal calendar option that defines the start date of the fiscal calendar.<source>must be of typedate,timestamp, ortimestamptz, and<field>must befiscal_week,fiscal_month,fiscal_quarter, orfiscal_year. See Fiscal Calendar Options.first_day_of_localized_week => <value>: A localized week option that defines the start of a week.<source>must be of typedate,timestamp, ortimestamptz, and<field>must belocalized_week. See Localized Week Options.
Returns a timestamp, timestamptz, or interval value that matches the type of the source.
<source>can’t be of typeintervalwhen<field>isweek, because a month can contain a fractional number of weeks.- You can’t provide a time zone with
timestamporintervalinput. - With
timestamptzinput,DATE_TRUNCtruncates with respect to a time zone. For example, truncating todayproduces 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.