Number formatting

Hi,
   What's the best way to format a number for currency? The value 1.80 for example would be stored in a float as 1.8  

   What's the best way to do this? :)


Thanks,

Pete

LVL 1
petepalmerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
expertmbConnect With a Mentor Commented:
0
 
Al-KhwarizmiConnect With a Mentor Commented:
NumberFormat.getCurrencyInstance().format ( myNumber );
0
 
expertmbCommented:
Al-Khwarizmi,
the link has same piece of code :)
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Al-KhwarizmiCommented:
I know, but I didn't see your comment when I posted mine, as I took a while to test the code. :/
Isn't there any way to delete comments?
0
 
expertmbCommented:
>>I know, but I didn't see your comment when I posted mine, as I took a while to test the code. :/
it happens. it happened many times to me also. no problem :-)

>>Isn't there any way to delete comments?
venabili might help in this regards.

0
 
petepalmerAuthor Commented:
Only fair that you both win. One gave me some examples, the other took the time to test it - so I doubled the points and halved them between you :)

Cheers for your help!
0
 
expertmbCommented:
:-)
cheers to ALL !!!

mb...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.