ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 22nd, 2004, 03:10 PM
pumpkin head pumpkin head is offline
what do I know about diamonds?
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2003
Location: ON, Canada
Posts: 950 pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 51652 Folding Title: Beginner FolderFolding Points: 51652 Folding Title: Beginner FolderFolding Points: 51652 Folding Title: Beginner Folder
Time spent in forums: 1 Week 1 Day 35 m 53 sec
Reputation Power: 173
round() vs formatNumber()

So, I'm working on finishing a project the was started by someone else who no longer works here. Its an asp page that takes a whack of numbers form a db, and makes em look all pretty in tables. (its a remake of an excel spreadsheet)
the problem is some of the numbers are not apearing properly. I'm thinking it's because they used Round() sometimes and formatNumber() other times.
the question is... do these functions handle numbers differently? i know formatNumber can do more then just round but i just need it to make the numbers 1 or 2 decimals.

thanks,
Patricia
__________________


Reply With Quote
  #2  
Old October 22nd, 2004, 03:14 PM
WisconsinGuy's Avatar
WisconsinGuy WisconsinGuy is offline
I thank you very little
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2003
Location: Milwaukee, WI
Posts: 1,028 WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 19 h 35 m 41 sec
Reputation Power: 13
__________________
PEACE!

Reply With Quote
  #3  
Old October 22nd, 2004, 03:32 PM
pumpkin head pumpkin head is offline
what do I know about diamonds?
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2003
Location: ON, Canada
Posts: 950 pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 51652 Folding Title: Beginner FolderFolding Points: 51652 Folding Title: Beginner FolderFolding Points: 51652 Folding Title: Beginner Folder
Time spent in forums: 1 Week 1 Day 35 m 53 sec
Reputation Power: 173
I've been there... but it doesn't specify weather formatNumber() truncates the number or rounds.

Reply With Quote
  #4  
Old October 22nd, 2004, 03:36 PM
WisconsinGuy's Avatar
WisconsinGuy WisconsinGuy is offline
I thank you very little
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2003
Location: Milwaukee, WI
Posts: 1,028 WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 19 h 35 m 41 sec
Reputation Power: 13

Reply With Quote
  #5  
Old October 22nd, 2004, 04:00 PM
pumpkin head pumpkin head is offline
what do I know about diamonds?
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2003
Location: ON, Canada
Posts: 950 pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 51652 Folding Title: Beginner FolderFolding Points: 51652 Folding Title: Beginner FolderFolding Points: 51652 Folding Title: Beginner Folder
Time spent in forums: 1 Week 1 Day 35 m 53 sec
Reputation Power: 173
wow, i'm sorry, i'm comepletely blind!! *sigh* it's been a long day. Thanks for pointing that out!!
one thing i did figure out, round will not have trailing zeros while formatNumber does.

Thanks again WisconsinGuy for pointing out the obvious that im way to tired!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > round() vs formatNumber()

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap