BookmarkSubscribeRSS Feed
yonib
SAS Employee
Hi,
Let say I have:

data test;
w="8,5";
run;

I want to convert the variable w to numeric but to numeric with period and not with comma .
the result should be 8.5.
I wanted to do it only with input function (not to use scan/translate function before).
Is there a way to do it (a appropriate format)?

Thanks in advance
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
Check out the COMMAX informat for use with the INPUT function:
http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000204406.htm

cynthia
yonib
SAS Employee
Hi Cynthia,
Thanks alot!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 713 views
  • 0 likes
  • 2 in conversation