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!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1514 views
  • 2 likes
  • 3 in conversation