Of course I can put the numeric variable into character, then use substr, then later I can convert character back into numeric. I need to get the last character of a string. I want to retrieve the first 4 digits 1234 into a new numeric variable. 1, 12; See the formatting characters in action in the example below-