| Author |
formatting integer to include commas
|
Bill Brasskey
Ranch Hand
Joined: Jun 01, 2004
Posts: 47
|
|
All I'm wanting to do is format an integer to include commas in the proper places... if I use NumberFormat class and set min and max fraction digits to "0" , will this work? I dont want the period at the end, either. ex. 1000 to 1,000
|
 |
Eric Fletcher
Ranch Hand
Joined: Oct 26, 2000
Posts: 188
|
|
Check out the API for DecimalFormat, it should help you out. Take a look. HTH, E
|
My theory of evolution is that Darwin was adopted. - Steven Wright
|
 |
Blake Minghelli
Ranch Hand
Joined: Sep 13, 2002
Posts: 331
|
|
Use DecimalFormat which is a concrete subclass of NumberFormat. You can use it to specify the exact mask you want to apply, like this: I believe that will give you the result you are looking for.
|
Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"
|
 |
 |
|
|
subject: formatting integer to include commas
|
|
|