1. Check out our app, Forums for Android! Download and leave feedback here!

Forcing Double datatype to have two decimal places

Discussion in 'Application Development' started by paul72, Sep 10, 2010.

  1. paul72

    paul72 Member
    Thread Starter
    35

    Jul 20, 2010
    10
    0
    35
    Systems Analyst
    Louisiana
    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...