Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Format Numbers

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Format Numbers
  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 Numbers - 2/6/2002 7:41:42 AM   
  Brenda

 

Posts: 2
Score: 0
Joined: 12/11/2001
From: USA
Status: offline
I working from an access Db where my numbers are stored with formating, but the formatting is lost on my web page.

For example, 23,123.00 in my DB displays as 23123 on my web page. How do I get the formatting to carry over?

I tried VB's format(myVal, "#,###.#") but that gave me an error.

Thanks!


~B
 
 
Post #: 1
 
 Re: Format Numbers - 2/21/2002 6:15:55 PM   
  imav8n

 

Posts: 95
Score: 0
Joined: 7/3/2001
From: USA
Status: offline
Really whats happening, is Access stores the number as 23123...and flags it to display in a given format. Unfortunately, that flag doesn't get included in an ADO query, only the data part gets returned.

Since you now know that your only going to get the data...you can compensate for it by using the FORMATNUMBER() function in VBS...

For info on how to use this function, and a listing of other VBS functions, try checking out www.devguru.com in general, or specifically for vbs functions, go to: http://www.devguru.com/Technologies/vbscript/quickref/functions.html

Good Luck!


~imav8n
Failure is not an option.....it comes bundled with the software.

(in reply to Brenda)
 
 
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 Numbers 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