Hello
I created my format using code:
proc format; picture thousand low-high = '000 000 000 009'; run;
and export data to excel
proc sql;
create table work.mydata as
select t.data format=thousand.
from work.tabel t
;quit;
proc print data=mydata noobs: title "My data"; run;
and get result stored as text:
How to convert it to numeric format in SAS?
I don't understand what you are asking.
You created a NUMERIC format. So it can only work with a NUMERIC variable. The picture seems to be showing that the format worked because it is showing values like '243 516' instead of '243516' that would normally be used to display the number 243,516 when you had not attached any format to the variable.
What is the photograph from? Those little green triangles make it look like a snapshot of part of how Excel would display a spreadsheet.
Photograph is from Excel and green triangle shows that it's number stored as text. How to export the data, that it will be number in excel.
A string with blanks does not constitute a number. Export the number as a number, and do the formatting in Excel.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.