`TRUNC`

Data 360 Query Guide, mirrored from developer.salesforce.com: **Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

markdownreferencev13PYE-Z584guide: data-cloud-query-guidestage: referencetrust: officialsource: developer.salesforce.comservice: data360interface: sql`TRUNC`Data 360Data CloudData 360 Query Guide

Created 23 Oct 2026 · Modified 23 Oct 2026 · 1 version

Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/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.

TRUNC

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Truncates a value toward zero, either to an integer or to a specified number of decimal places.

  • <dp_or_numeric> / <v>: The double precision or numeric value to truncate.
  • <s>: The number of decimal places to truncate to. When omitted, the value is truncated to an integer.

Returns the truncated value by using the same data type as the input.

  • trunc truncates toward zero, so it differs from floor for negative values. For example, trunc(-1.9) returns -1, but floor(-1.9) returns -2.
  • A negative value for s truncates to the left of the decimal point.

Truncate a value toward zero.

Returns 2 and -1.

Truncate a value to two decimal places.

Returns 42.43.

Read this document as markdown — the same bytes an agent receives.