Webmaster Forum

Go Back   Webmaster Forum > Scripting/Programming & Debugging > ASP & VBScript Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

ASP & VBScript Forum Need help from a webmaster with ASP or VBScript, you may ask in this forum?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-17-2008, 07:56 PM
mmj mmj is offline
Junior Member
 
Join Date: Apr 2008
Posts: 2
mmj is an unknown quantity at this point
Submit to Clesto Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq Submit to Spurl
Default Easy Format Number question?

I have a number in a database with numbers for acreages (eg. 13319, 1757002, 2063). The decimal place would normally be 3 spaces from the end and not rounded. I want a decimal placed in the 3rd space from the last character, then rounded to 2 decimal spaces (eg. 13.32, 175.70, 2.06) I hope I am making this clear. The number is a long integer type in my Access Database. My webpage uses ASP, VbScript and SQL.

I tried:
html= html & addRow2("Acres", FormatNumber(rs("ACRES"),2))

and ended up with 2 0's (eg. 13319.00, 2063.00) tacked on to the end. I'm not sure what I'm doing wrong here. Any help would be appreciated.

Thanks,
MJ
Reply With Quote

This ad is part of our Revenue Sharing program
  #2 (permalink)  
Old 05-14-2008, 04:01 PM
mcnd mcnd is offline
Junior Member
 
Join Date: May 2008
Posts: 3
mcnd is an unknown quantity at this point
Submit to Clesto Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq Submit to Spurl
Default

Quote:
Originally Posted by mmj View Post
html= html & addRow2("Acres", FormatNumber(rs("ACRES"),2))
Well, what if you use

Code:
html= html & addRow2("Acres", FormatNumber(rs("ACRES")/1000,2))
Reply With Quote
  #3 (permalink)  
Old 05-19-2008, 02:15 PM
mmj mmj is offline
Junior Member
 
Join Date: Apr 2008
Posts: 2
mmj is an unknown quantity at this point
Submit to Clesto Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq Submit to Spurl
Default Thanks!

Thanks! That did work. I changed the 1000 to 10000 but it did the trick!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding freelance jobs around the web made easy. gwl Jobs Forum 0 12-03-2007 09:21 PM
Question Regarding Linux CUPS Drivers CanadianJeff Computer Help 1 10-06-2007 04:18 AM
Open question to the Affiliates Angie Webmasters Lounge/General Chat 1 08-20-2007 07:30 PM
Big question. detoam PHP Forum 4 02-20-2007 08:39 AM


All times are GMT. The time now is 06:34 AM.


Creative Commons License
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30