Product SiteDocumentation Site

7.4.51. RIGHT


>>-RIGHT(string,length--+------+--)----------------------------><
                        +-,pad-+

Returns a string of length length containing the rightmost length characters of string. The string returned is padded with pad character, or truncated, on the left as needed. The default pad character is a blank. The length must be a positive whole number or zero.
Here are some examples:

Example 7.65. Builtin function RIGHT

RIGHT("abc  d",8)     ->    "  abc  d"
RIGHT("abc def",5)    ->    "c def"
RIGHT("12",5,"0")     ->    "00012"