---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/formatting-func.md
cuppy_section: docs
cuppy_doc: QVEY-HDAT
cuppy_doc_uuid: 3cd63d6c-1f13-49a7-81bc-0244219b7131
cuppy_permalink: https://cuppy.io/salesforce/d/QVEY-HDAT
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/formatting-func
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: 6f38f9cd120a643ed922032605c727ba6b61d1881e3bde8cad4f03825f2e4ff6
# 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/formatting-func.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.

## Data Type Formatting Functions

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

Functions that convert between numbers, dates, and timestamps and their string representations. Use data type formatting functions to:

*   Format numbers for display by converting numeric values to strings with custom patterns.
*   Parse date and time strings by converting text input into typed date or timestamp values.
*   Generate readable output by formatting timestamps and intervals into locale-friendly strings.

*   NULL handling: All formatting functions return NULL when any argument is NULL.
*   Pattern syntax: Date and time formatting uses TO_CHAR patterns (such as `YYYY-MM-DD`). Numeric formatting uses FORMAT_NUMBER patterns (such as `#,###.0`).

Convert typed values to formatted strings:

*   [FORMAT_NUMBER](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/format-number.html) — Convert a number to a string using a format pattern.
*   [TO_CHAR](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/to-char.html) — Convert a timestamp or interval to a string using a format pattern.

Convert strings to typed date and time values:

*   [TO_DATE](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/to-date.html) — Convert a string to a date using a format pattern.
*   [TO_TIMESTAMP](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/to-timestamp-string.html) — Convert a string to a timestamp using a format pattern.

Convert a numeric value to a string with thousands separators and decimal places.

Returns `'1,234,567.89'`.

Convert a text date into a typed `date` value for comparison or arithmetic.

Returns `2000-12-05`.

Convert the current timestamp into a human-readable string.

Returns a string such as `'Tuesday, 6 May 2025 03:22:45 PM'`.

*   [Data Types](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/datatypes.html)
*   [String Functions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/string-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 -->
