Left

This function retains the specified number of characters on the left side of a string and removes the remaining characters on the right side of the string.

Syntax

Left(string, length)

Parameters

string
String expression from which the leftmost characters are returned. If string contains Null, Null is returned.
Length
Numeric expression that indicates how many characters to return. If 0, a zero-length string ("") is returned. If greater than or equal to the number of characters in string, the entire string is returned.

Return Values

Returns a string.

Remarks

Use the Len function to determine the number of characters in a string.

Use the LeftB function with byte data contained in a string. Instead of specifying the number of characters to return, length specifies the number of bytes.