---
schema_version: "1"
id: 5fe51273fb98606b48648fe5bc9d5ba31d4a821d495d12a3a670560d94cbf0aa
title: TEXT
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/customize_functions_text.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.customize_functions_text.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d229331207f53feccf1e08eb928768a1d6616373cc47af960166c8975cd5786d
description: Converts a percent, number, date, date/time, or currency type field into text anywhere formulas are used. Also, converts picklist values to text in approval rules, approval step rules, workflow rules, escalation rules, assignment rules, auto-response rules, validation rules, formula fields, field updates, and custom buttons and links.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# TEXT

Converts a percent, number, date, date/time, or currency type field into text anywhere formulas are used. Also, converts picklist values to text in approval rules, approval step rules, workflow rules, escalation rules, assignment rules, auto-response rules, validation rules, formula fields, field updates, and custom buttons and links.

## Use

`TEXT(value)` and replace value with the field or expression you want to convert to text format. Avoid using any special characters besides a decimal point (period) or minus sign (dash) in this function.

## Tips

- The returned text is not formatted with any currency, percent symbols, or commas.
- Values are not sensitive to locale. For example, 24.42 EUR is converted into the number 24.42.
- Percents are returned in the form of a decimal.
- Dates are returned in the form of YYYY-MM-DD, that is, a four-digit year and two-digit month and day.
- Date/time values are returned in the form of YYYY-MM-DD HH:MM:SSZ where YYYY is a four-digit year, MM is a two-digit month, DD is a two-digit day, HH is the two-digit hour, MM are the minutes, SS are the seconds, and Z represents the zero meridian indicating the time is returned in UTC time zone.
- Picklist fields are supported in TEXT functions used in these kinds of formulas: validation rules, approval rules, approval step rules, workflow rules, escalation rules, assignment rules, auto-response rules, formula fields, field updates, and custom buttons and links. In other formulas, use ISPICKVAL or CASE when referencing a picklist field.
- If the text value you enter is a URL, the text automatically converts as a hyperlink.
- When converting decimal results to text in Lightning, leading zeros are removed. When converting decimal results to text in Classic, leading zeros are retained.

![Expected Revenue in Text Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

Expected Revenue in Text Example

`TEXT(ExpectedRevenue)` returns the expected revenue amount of an opportunity in text format without a dollar sign. For example, if the Expected Revenue of a campaign is "$200,000," this formula field displays “200000.”

![Asset ID Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

Asset ID Example

`SerialNumber &"-"& TEXT(Quantity)` returns an asset ID number starting with the serial number and ending with the quantity separated by a dash. The Serial Number field is already text but the Quantity field is a number, requiring the TEXT function before it.

![Picklist Values in Math Equations Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

Picklist Values in Math Equations Example

```
VALUE(LEFT(TEXT(Quantity), 5)) * Unit
```

This formula multiplies the first five numbers of the Quantity picklist by the Unit numeric field.

![Compare Two Picklists Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

Compare Two Picklists Example

```
IF(TEXT(bug_status) = TEXT(case_status), "Match", "Out of Sync")
```

This formula compares the values of the bug\_status picklist with values of the case\_status picklist.

![Picklist Values from Parent Records Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

Picklist Values from Parent Records Example

```
TEXT(Account.Industry)
```

This formula field on opportunities shows the industry of the associated account.

![Concatenate Picklist Values Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

Concatenate Picklist Values Example

```
TEXT(Account.Industry) & " - " & TEXT(Account.SubIndustry__c)
```

This formula field on opportunities shows the industry and subindustry of the associated account.

![Validation Rule Example: Block the Save of a Closed Opportunity](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

Validation Rule Example: Block the Save of a Closed Opportunity

`CONTAINS(TEXT(Status), "Closed")` returns TRUE if the Status picklist contains the value “Closed,” such as “Closed Won” and “Closed Lost.” This validation rule formula blocks users from saving changes to a closed opportunity.

![Validation Rule Example: Use Numeric Functions on Numeric Picklist Values](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

Validation Rule Example: Use Numeric Functions on Numeric Picklist Values

`VALUE(LEFT(TEXT(Quantity), 5)) * Unit > 10000` multiplies the first five numbers of the Quantity picklist by the Unit numeric field, and returns TRUE if the result is greater than 10,000.

![Directly Compare Two Picklists Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

Directly Compare Two Picklists Example

`TEXT(bug_status) = TEXT(case_status)` compares the values of the bug\_status picklist with values of the case\_status picklist, and returns TRUE if they are equal.