Forcing Double datatype to have two decimal places


Last Updated:

  1. paul72

    paul72 Member This Topic's Starter

    Joined:
    Jul 20, 2010
    Messages:
    10
    Likes Received:
    0
    I'm working on a calculator that deals with currency amounts and I'm trying to restrict the results to have only two decimal places. I've been scouring the web and have tried several things like converting to an integer, then back to a float and dividing by 100, etc but I haven't had luck yet.

    Can anyone offer a suggestion? Thank you!
     

    Advertisement

Share This Page

Loading...