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
Diamond | Level 26
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!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1003 views
  • 0 likes
  • 2 in conversation