#1
  1. No Profile Picture
    what do I know about diamonds?
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2003
    Location
    ON, Canada
    Posts
    950
    Rep Power
    174

    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

  2. #2
  3. I thank you very little
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2003
    Location
    Milwaukee, WI
    Posts
    1,028
    Rep Power
    14
  4. #3
  5. No Profile Picture
    what do I know about diamonds?
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2003
    Location
    ON, Canada
    Posts
    950
    Rep Power
    174
    I've been there... but it doesn't specify weather formatNumber() truncates the number or rounds.

  6. #4
  7. I thank you very little
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2003
    Location
    Milwaukee, WI
    Posts
    1,028
    Rep Power
    14
    PEACE!
  8. #5
  9. No Profile Picture
    what do I know about diamonds?
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2003
    Location
    ON, Canada
    Posts
    950
    Rep Power
    174
    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!


IMN logo majestic logo threadwatch logo seochat tools logo