RIGHT

Syntax:

RIGHT ( string [ , number-chars ] )

Description: Extracts the right-most number-chars characters from string. (RIGHT is intended for use with languages that use the single-byte character set (SBCS), whereas RIGHTB3.17.7.273) 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 right-most number-chars characters from string.

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

example: