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?

[Webinar] Streamline your web hosting managementRegister Today

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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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
All Courses

From novice to tech pro — start learning today.