Activity Forums Salesforce® Discussions How to use decimal variable on vf page with decimal values?

  • Ravi

    April 26, 2016 at 9:31 am

    Hi Utsav,

    You can use setScale(scale) method of Decimal class to scale your decimal as par requirement.

    decimal d = 2;
    System.debug('d>>>>'+ d.setScale(2));

    14:56:43:003 USER_DEBUG [2]|DEBUG|d>>>>2.00

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos