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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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