LEFT

Syntax:

LEFT ( string [ , number-chars ] )

Description: Extracts the left-most number-chars characters from string. (LEFT is intended for use with languages that use the single-byte character set (SBCS), whereas LEFTB3.17.7.190) is intended for use with languages that use the double-byte character set (DBCS).)

Arguments:

Name

Type

Description

string

text

Designate the string from which a substring is to be extracted.

number-chars

number

The number of characters to be extracted. If omitted, a count of 1 shall be assumed. number-chars shall be at least 0. If number-chars exceeds the length of string, the whole of string shall be extracted.

Return Type and Value: text – A string containing the left-most number-chars characters from string.

However, if number-chars is negative, #VALUE! is returned.

example: