Right
The Right function will return the rightmost characters
from a string. The first parameter is the string you want to extract
from. The second parameter is the number of characters on the
right side to return.
You should use the right function whenever you know exactly how many
characters you want to remove from the right side of a string. You
can also use the Mid function to remove characters from the
right side of the string by only passing the position of the starting
character.
Dim sZip ' entire zip code
Dim sPlus4 ' additional four characters
sZip = "92030-5402" If Len(sZip) > 9 Then sPlus4 = Right(sZip, 4) Response.Write "Plus4: " & sPlus4 & "<BR>" End If
|
 |

|