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 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!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 955 views
  • 2 likes
  • 3 in conversation