views:

468

answers:

1

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;
+2  A: 

Try this

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

I got

y=0.14553821459
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..
Bazil