Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format decimal places 2

Status
Not open for further replies.

MikeT

IS-IT--Management
Feb 1, 2001
376
US
I need to format a number so it displays out to the fifth decimal place.
Also, if I tell to 3.49999 to display out to the 2nd decimal place, will it show 3.50 or 3.49?
Thanks!
 
you can use the formatNumber(number, 5) function to get your desired results. number being the argument, and 5 being how many places you want the result to show.

And yes, if you ask for two decimal places on 3.499999, then you will get 3.50 --

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top