📌 More functions: see the Formula function reference.
Basics
TEXT is a common AI Table function — converts a number to text in a specified format. Define how numbers display: dates, times, currency, percentages, etc.| Format / placeholder | Meaning | Example |
|---|---|---|
| # | Digit placeholder for custom number formats | TEXT(34.56,”##.#”)=34.6 TEXT(123.456,”##.##”)=123.6 TEXT(78.901,”###.###”)=78.901 |
| 0 | Digit pad for custom number formats | TEXT(56.7,“0.00”)=56.70 TEXT(89.12,“0.00”)=89.12 TEXT(3.14,“000.00”)=003.14 |
| , | Thousands separator — between # or 0 | TEXT(123456,“0,0”)=123,456 |
| % | Percent — use with # or 0 | TEXT(50,“0%”)=5000% |
| YYYY | Full year | TEXT(“2023-5-20”,“YYYY”)=2023 TEXT(“2023-5-20”,“YYYY year”)=2023 year |
| YY | Short year | TEXT(“2023-5-20”,“YY”)=23 TEXT(“2023-5-20”,“Y”)=23 |
| MMM | Full month | TEXT(“2023-5-20”,“MMM”)=May |
| MM | Padded month digits | TEXT(“2023-520”,“YYYY/MM”)=2023/05 |
| M | Short month digits | TEXT(“2023-5-20”,“M”)=5 |
| DD | Padded day | TEXT(“2023-5-1”,“DD”)=01 |
| D | Short day | TEXT(“2023-5-1”,“D”)=1 |
| DDDD | Full weekday | TEXT(“2023-5-1”,“DDDD”)=Monday |
| DDD | Short weekday | TEXT(“2023-5-1”,“DDD”)=Mon |
| hh | Hour | TEXT(“19:45”,“hh”)=19 |
| mm | Minute | TEXT(“19:45”,“hh:mm”)=19:45 |
| ss | Second | TEXT(“19:45:30”,“ss”)=30 |
Syntax
- value: number or date to convert.
- format_text: format string.
Examples
Example 1: format as currency
[Field 1] in the first record is 1234.567.Example 2: format date
[Field 1] in the first record is 2023-03-15.FAQ
- Q: How do I drop the time and keep only the date when a function returns yyyy-mm-dd hh:mm? A: Method 1: use TEXT(). New formula field: TEXT([source value], “YYYY-MM-DD”). Method 2: double-click the formula field, switch field type to date, and pick the desired date format.
- Q: TEXT() returns a number-looking value, but other functions error on it. Why? A: TEXT() output is text. To use it in numeric computation, first wrap with SUM() or ABS() to convert back to a number.