Activity Forums Salesforce® Discussions How can we convert the large digit decimal number to certain digit decimal number in Salesforce?

  • How can we convert the large digit decimal number to certain digit decimal number in Salesforce?

  • Mohit

    Member
    September 20, 2016 at 2:52 pm

    Hi All,

    How can we convert the large digit decimal number to certain digit decimal number?

    Please give suggestion

  • Tanu

    Member
    September 21, 2016 at 7:03 am

    Hello Mohit,

    Try this,

    Decimal toround = 3.14159265;
    Decimal rounded = toround.setScale(2);
    system.debug(rounded);

Viewing 1 - 2 of 2 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos