I. Intro
The TEXT function converts numbers to text in the specified format. It can be used to convert field results to text or to combine numbers with text or symbols.
Arguments:
TEXT(value, format)
- value: The value to be converted.
- format: The format you want to convert the specified value to. This can be customized.
Supported formats
II. Steps
- Open the base and click the + icon on the right-most side of the table. Enter a field type and change the field type to Formula.
250px|700px|reset
- In the formula editor, enter the TEXT function. Select the table or field to which you want to apply the formula, and enter the format you need.
For example, in a sales report, if the sales rep wants to use the date as the contract code, they can use TEXT([Date],"YYMMDD"). As shown in the figure below, the date format is converted into the required format.
250px|700px|reset
250px|700px|reset
III. Use cases
Combine dates with text
Scenario: Combine the date with stock level to create a unique string.
Formula: TEXT([Date purchased],"MM/DD/YYYY")&"purchased"&"-"&[Stock]
Note: The & symbol in the formula can be used to concatenate characters or strings.
250px|700px|reset
Calculate working hours
Scenario: Calculate working hours based on when staff arrive and leave the office and display it in hours and minutes.
Formula: TEXT([Clock out time]-[Clock in time],"hh:mm")
250px|700px|reset
Create a standardized format
Scenario: Create an Employee ID by combining an employee's department and employee code.
Formula: [Department]&"-"&TEXT([Code],"0000")
250px|700px|reset
Calculate the difference in hours between two dates
Scenario: When scheduling a meeting, you may need to calculate the time difference between participants in different countries and regions.
Description: When calculating the difference, you can specify the format shown in the final result.
Formula: TEXT([Time 1]-[Time 2],"[h]")
Note: Time 1 cannot be earlier than Time 2.
250px|700px|reset

IV. FAQs