---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/trunc.md
cuppy_section: docs
cuppy_doc: 3PYE-Z584
cuppy_doc_uuid: 70775b9b-592b-4dc0-86e8-ba9630b995d6
cuppy_permalink: https://cuppy.io/salesforce/d/3PYE-Z584
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/trunc
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: 6128004c3185d4e845eaf7aa6619028d8f7c6e25f996c221750324e7552e631e
# 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/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`.

*   [ROUND](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/round.html)
*   [CEIL / CEILING](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/ceil.html)
*   [FLOOR](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/floor.html)
*   [Mathematical Functions and Operators](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/math-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 -->
