I have a numerical variable which takes values of varied lengths. I want to add a decimal point before two last two digits in each value. For Example if the original value in a row is 180000, the new value should be 1800.00, and if its 5676456, the new value should be 56764..56
How can I achieve this? Please help
Divide by 100 and use format 10.2 (or similar)
If you need to do this while reading from an external source, use a proper informat:
data want;
input number 10.2;
format number 10.2;
datalines;
180000
5676456
;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.