The LEFT() function returns the first n characters of a text string. It is useful for extracting a prefix or a code.
Function name:
LEFT()
Syntax
LEFT(text, number_of_characters)ℹ Calling function parameters in TimeTonic:
- $field_name = field (link, linked table column, number, selection, formula, text...).
- "free text" = free text to be added between quotation marks.
- do not use quotation marks for numbers.
Parameters
| Parameter | Description |
|---|---|
text |
Source character string. |
number_of_characters |
Number of characters to return from the start (default is 1). |
Example
LEFT("ABC1234", 3)Result: "ABC"
If number_of_characters is 0, an empty string is returned.
Notes
If
number_of_charactersexceeds the length of the text, the entire string is returned.
Return type
The function returns a text string.
The output type format of the result can be configured in the output field options of the formula editor. For more details, see Output format options in the Formula column article.