Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


format decimal places

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,204
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> format decimal places
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 format decimal places - 6/23/2001 12:02:59 AM   
  itan

 

Posts: 10
Score: 0
Joined: 5/31/2001
From: USA
Status: offline
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!
 
 
Post #: 1
 
 Re: format decimal places - 6/23/2001 12:04:40 AM   
  dropme

 

Posts: 18
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
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 --

(in reply to itan)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> format decimal places Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts