BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
guilhermeagc
Calcite | Level 5

Hi friends, 

 

I have imported an Excel sheet with a value, and i need to change de format.

Example: The value in excel is 342554.1294

I think the correct value is 34.255,41

 

Anyone know how i can format it in a computed Column?

 

I'm importing the sheet by import task in SAS GE

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

@guilhermeagc wrote:

Hi friends, 

 

I have an Excel sheet with a value, and i need to change de format.

Example: The value in excel is 342554.1294

I think the correct value is 34.255,41

 

Anyone know how i can format it in a computed Column?


If you have the value 342,554.1294 and you want it to display as 32,255.41 then you need to divide by 10.

 

If you want the decimal point and thousands separators meaning reversed then try using the COMMAX format. Or perhaps one of the NLNUM formats.  If you specify the decimal digits as 2 on the format then the fractional part will be displayed as 41 instead of 41294.  Make sure when specifying the overall width to include room for the decimal point and thousands separators.

View solution in original post

4 REPLIES 4
PeterClemmensen
Tourmaline | Level 20

This is hardly a SAS question? 🙂

guilhermeagc
Calcite | Level 5
I'm importing the sheet by import task in SAS GE
Tom
Super User Tom
Super User

@guilhermeagc wrote:

Hi friends, 

 

I have an Excel sheet with a value, and i need to change de format.

Example: The value in excel is 342554.1294

I think the correct value is 34.255,41

 

Anyone know how i can format it in a computed Column?


If you have the value 342,554.1294 and you want it to display as 32,255.41 then you need to divide by 10.

 

If you want the decimal point and thousands separators meaning reversed then try using the COMMAX format. Or perhaps one of the NLNUM formats.  If you specify the decimal digits as 2 on the format then the fractional part will be displayed as 41 instead of 41294.  Make sure when specifying the overall width to include room for the decimal point and thousands separators.

guilhermeagc
Calcite | Level 5

It Works, Tom!

 

You are the best! Thanks!

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 4 replies
  • 579 views
  • 2 likes
  • 3 in conversation