TEXT
The TEXT function allows you to format numbers, dates, times, and logical values by applying a specific display format, making the values more readable.
Use
TEXT( value [, display_format] )
Formats a value and converts it to text.
| Parameter | Required | Description |
|---|---|---|
| value | Yes | a number, logical, date, time, or date/time value to format |
| display_format | No | a display format relevant to the data type (uses default if omitted) |
| Returns | Text |
Examples
Formatting Numeric Data for Communication (Input Mapping)
You can use the TEXT function to turn a raw number into a readable currency or percentage format before displaying it in a summary field or a Teams notification.
- Scenario: You want to create a summary line for an expense approval that includes the total amount formatted as currency.
- Formula:
CONCAT("The total claim is ", TEXT($TotalAmount, "$#,###.00")) - Logic:
$TotalAmount: A numeric variable containing a raw value (e.g., 1234.5)."$#,###.00": A number format pattern that adds a dollar sign, a thousands separator, and two decimal places.- Result: The function returns the text string "$1,234.50".
Standardizing Dates for Custom Identifiers (Variable Update)
You can use the TEXT function to extract specific parts of a date and format them to create a standardized "Request ID" or "Audit Code."
- Scenario: You need to generate a project code that includes the year and the abbreviated month of the current date (e.g., "PRJ-2024-OCT").
- Formula:
CONCAT("PRJ-", TEXT(TODAY(), "y-MMM")) - Logic:
TODAY(): A function that returns the current date."y-MMM": A date format pattern whereyrepresents the full year andMMMrepresents the three-character abbreviated month.- Result: If today is October 15, 2024, the function returns "2024-Oct", which is then concatenated into "PRJ-2024-Oct".
Pro Tip: If the display_format parameter is omitted, the function will automatically apply a default format based on the specific data type of the value being converted. These defaults (such as how a logical TRUE/FALSE is written out) can be managed by an Account Owner or Admin in the Regional Settings.