BookmarkSubscribeRSS Feed
J_J_J
Obsidian | Level 7

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:

J_J_J_0-1683781131544.png

How to convert it to numeric format in SAS?

 

3 REPLIES 3
Tom
Super User Tom
Super User

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.

J_J_J
Obsidian | Level 7

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.

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
  • 3 replies
  • 642 views
  • 0 likes
  • 3 in conversation