Right

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

Syntax

Right(string, length)

Parameters

string
String expression from which the rightmost 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 RightB function with byte data contained in a string. Instead of specifying the number of characters to return, length specifies the number of bytes.

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