09-04-2017 12:20 PM
I am very new to SAS and still learning so apologies if my question is simple.
I have a numeric column (this has to stay numeric) and in that column I have for example:
The issue is since I have placed the 2.1 into the mix the list now reads as follows:
Is there anyway to remove the 0s!
Thanks very much in advance
09-04-2017 06:16 PM
Use a 2. format. When you tell SAS to display decimals (by using a format with a number after the dot), it will do so.
09-04-2017 07:08 PM
If you use the 2. format, you will lose a piece: 2.1 will print as 2 instead.
Worth a try: the best3. format. For example:
format varname best3.;
I can't test it right now, but if this doesn't work I think the solution becomes more complex.
Is there some good reason that you don't want to see the zeros?