October 22nd, 2004, 03:10 PM
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.
October 22nd, 2004, 03:14 PM
October 22nd, 2004, 03:32 PM
I've been there... but it doesn't specify weather formatNumber() truncates the number or rounds.
October 22nd, 2004, 03:36 PM
October 22nd, 2004, 04:00 PM
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!