Floating Point Numeric - SAS decimal issue

Go To StackoverFlow.com

0

Does anybody know what SAS format is needed in order to convert this string correctly?

data _null_;
 x="0.14553821459";
 y=input(x,best32.);
 put y=;
run;
2009-06-16 14:07
by Allan Bowe


2

Try this

data _null_;
 x="0.14553821459";
 y=input(x,13.11);
 put y= 13.11;
run;

I got

y=0.14553821459
2009-06-16 15:59
by cmjohns
aah - interesting - never seen a format used on a put statement like that. I see the problem was not the conversion format but the format of the variable being created (Y in this case). Thankyou. - Allan Bowe 2009-06-16 17:21
Ads