For years I have put up with the 2 decimal places that ArcGIS adds to the "currency" formatting, but most of the time I do not want them and end up removing them in my exported map images. I cannot see a way to edit the number of decimals - does anyone have any ideas how to get rid of these decimals?
-
Are you talking about in labels? And what version of ArcGIS?– Chad CooperOct 1, 2012 at 18:28
-
1What file type are you working with. More detail will help.– CraigOct 1, 2012 at 18:39
-
Chad - yes, the formatting of labels. I am using v10.0 with SP3. @Craig - I'm working with a column in a shapefile called "cost" that is formatted as a long integer.– CharlesOct 1, 2012 at 19:04
-
What about adding thousands separators then after the dollar sign has been added to the string?– user32940Jun 27, 2014 at 14:58
6 Answers
You could use Brad's answer in conjunction with a label expression that adds the dollar sign (or other appropriate currency symbol).
VBScript example:
"$" & [CHA_CHING]
-
+1 it seems like all you're after is the dollar sign -- a Label Expression is the way to go.– RoyOct 1, 2012 at 20:17
EDIT: There may be some business reason you need to have the field set to currency but I think I would manage it in a different way.
Anyway you can also always round the result before displaying the label.
Since it say localized currency settings
you might try looking at the windows settings for your computer.
To change the way your computer displays currency values, click the Currency tab. Items you might want to change based on the format language you choose include the currency symbol, the formats used for positive or negative amounts, and the punctuation used to separate numbers.
OLD: If you open the attribute table.
Go to the field you want to modify.
Right click and select properties.
on the properties it should say numeric...
Select the ...
In that format dialog you will see the number of decimals.
Turn it to 0
-
Thanks Brad. I'm familiar with editing the number of decimal places for "numeric", but what if you select "currency" instead? There is no way to remove the 2 decimal places for currency.– CharlesOct 1, 2012 at 19:02
-
Thanks for the help Brad. I think adding a dollar sign to your original idea is the way to go.– CharlesOct 1, 2012 at 20:18
-
I notice my image is a bit smallish. Round ([mymoneyfield],0) zero being the number of chars to the right of the decimal Oct 2, 2012 at 0:28
I see this is a really old thread, but I had this problem and found a little more info than I am seeing here:
I wanted to get currency format with $ in front, commas and no change on the end. I used vbscript FormatCurrency. That leaves .00 on the end.
I found format currency function syntax from visual basic works.
FormatCurrency([fieldname],0)
where the zero is number of decimal places does what I want.
This gave me a headache for a while, but I found this simple workaround.
In a new string field, convert the original numeric field into currency: formatcurrency( [NumberField] )
You should get a string field formatted as a currency with two decimal places.
Next, create a new string field with the following field calculation: Replace( [StringField], ".00", "")
That should replace the trailing decimals and zeroes with nothing and preserve the commas and dollar sign in the currency format. Hope this helps someone.
This thread was really helpful for me, and so I wanted to contribute. These solutions work great for modifying the attribute table and the labels for the layers. To change the legend labels, simply follow the next two steps:
- Open Layer Properties for the displayed layer.
- Click on each value and enter the $ sign where desired.
I've got a question that is half a degree off what we are discussing here. I have data that I want displayed as currency, or at least have a leading $, but I don't want groups like $1,710.32-$6,397.06. Four significant figures is good enough.
I know how to edit the label and change it to currency. I know how to set it as numeric, with four sig figs, and commas at the thousands.
I don't know how to do both at the same time.