Description
The TEXT
function converts a value to text.
Usage
TEXT(value, format)
Argument | Type | Required | Description |
---|---|---|---|
value | text number boolean time date month week single select multiple select |
Yes | Value to convert |
format | text | No | Description of the format |
The accepted format string depends on the type of the value.
Formatting numbers
If the value
argument is a number, then the format string should be composed of the following symbols:
Symbol | Meaning |
---|---|
0 | Digit |
# | Digit, zero shows as absent |
. | Decimal separator |
- | Minus sign |
, | Grouping separator |
% | Multiply by 100 and show as percentage |
‰ | Multiply by 1000 and show as per mille value |
' | Used to quote special characters in a prefix or suffix |
Distinct formats for positive and negative numbers can be provided by separating two formatting strings with the semicolon character (;
).
The following table provides examples for formatting numbers:
Value | Format | Result |
---|---|---|
12345 | 0,000 | 12,345 |
12345 | 0 | 12345 |
12345 | #,### | 12,345 |
345 | #,### | 345 |
2025 | 0000 | 2025 |
45 | 0 | 45 |
45 | 000 | 045 |
45 | 000.000 | 045.000 |
0.25 | 0% | 25% |
0.25 | 0.0% | 25.0% |
0.123456 | ‰123.46 | ‰123.46 |
35 | 0;(0) | 35 |
-35 | 0;(0) | (35) |
The result reflects the current locale of the user. If you add a Calculated field with the TEXT(1025.33, “#,###.00”)
Formula, then a user who configured ActivityInfo in English sees “1,025.33” but a user with French locale sees “1 025,33”.
For more information, see the Quantity field article.
Formatting dates and times
If the value
argument is a date or a time, the following symbols are recognized in the format string:
Letter | Date or Time Component | Examples |
---|---|---|
yyyy or yy | Year | 2025 or 25 |
YYYY or YY | Week year | 2025 or 25 |
M, MM, MMMor MMMM | Month of year | 7, 07, Jul or July |
d or dd | Day in month | 6 or 06 |
E or EE | Day of week name | Tue or Tuesday |
a | AM/PM marker | PM |
H or HH | Hour in day (0-23) | 7 or 07 |
h or hh | Hour in am/pm (1-12) | 2 or 02 |
m or mm | Minute in hour (0-59) | 5 or 05 |
s or ss | Second in minute (0-59) | 5 or 05 |
S | Millisecond | 978 |
z | General timezone | UTC+1 |
X | ISO 8601 timezone | -08 |
The following table shows examples of different formatting possibilities for the same date and time: 2025-01-16 14:30:33.
Format argument | Result |
---|---|
yyyy-MM-dd | 2025-01-16 |
d/m/yyyy | 16/1/2025 |
dd/MM/yyyy | 16/01/2025 |
d MMM yy | 16 Jan 25 |
d MMMM yy | 16 January 25 |
EEE d MMM yyyy | Thu 16 Jan 2025 |
EEEE d | Thursday 16 |
yyyy-MM-dd hh:mm a | 2025-01-16 2:30 PM |
yyyy-MM-dd HH:mm | 2025-01-16 14:30 |
yyyy-MM-dd HH:mm:ss | 2025-01-16 14:30:33 |
The result reflects the current locale of the user. If you add a Calculated field with the TEXT(DATE(2025, 1, 16), "MMMM d")
Formula, then a user who configured ActivityInfo in English sees “January 16” but a user with French locale sees “janvier 16”.
For more information, see the Quantity field article.