From: Kathy on 15 Jun 2010 11:30 Hi guys, I have a question, The value of variable "dose"(character variable) are "0000000.600","000000007.500" and "0000000.050", I would like to show "0.6","7.5" and "0.05". I tried to use functions (reverse, int), but all do not work. Could you give me some comments. Thanks a lot!!! Kathy
From: Ya on 15 Jun 2010 11:56 On Jun 15, 8:30 am, Kathy <kunliangrutg...(a)gmail.com> wrote: > Hi guys, > > I have a question, > > The value of variable "dose"(character variable) are > "0000000.600","000000007.500" and "0000000.050", I would like to show > "0.6","7.5" and "0.05". I tried to use functions (reverse, int), but > all do not work. Could you give me some comments. Thanks a lot!!! > > Kathy You can use input and put to convert it to needed format: 7 data _null_; 8 do dose="0000000.600","000000007.500","0000000.050"; 9 dose=put(input(dose,best32.),best6.); 10 put dose=; 11 end; 12 run; dose=0.6 dose=7.5 dose=0.05 HTH Ya
|
Pages: 1 Prev: Solaris Administrator Next: Select unique variable1, variable2, variable3 |