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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 419 views
  • 0 likes
  • 3 in conversation