syntax:functions:left
This is an old revision of the document!
Table of Contents
Left(text, no_of_chars)
Category: Text function
Description
This function returns the specified number of symbols from the left of text as a text value.
Arguments
Argument | Type | Description |
---|---|---|
text | Text | Any text value (in single or double quotes), or other value that can be implicitly converted to text if required. |
no_of_chars | Integer | The number of symbols returned from the left side of the text argument. |
Return value type: Text
Remarks
Regardless of the type of value passed in for text, the result of this function is always a text value.
Numbers and equations can be used as the text argument and are implicitly converted to their text-equivalent. When passing in an equation for text, no_of_chars number of symbols from the equation's result will be returned.
Passing in a date value (#yyyy-MM-dd) will return no_of_chars number of symbols from the converted date serial value. See the examples below.
Examples
left('Los Angeles', 3) = 'Los' left('IT services', 2) = 'IT' left(12345, 3) = '123' //Note, the numeric value of 12345 was passed in. The result is a text value. left(#2021-10-21, 3) = '444' //2021-10-21 is 44490 as a converted date serial value, so '444' is returned. left(100*3, 1) = '3' //The result of 100 * 3 = 300, so the '3' is returned as the single leftmost character.
See also
syntax/functions/left.1627447917.txt.gz · Last modified: 2021/07/28 00:51 by craigt