You need to sign in to do that
Don't have an account?
balaji_SFDC
How to get round off value by using two decimal values
I used Below codes i didn't get any result
Decimal toRound = 3.14159265359;
Decimal rounded = Math.round(toRound, 2);
system.debug(rounded);
Decimal toround = 3.14159265;
Decimal rounded = toround.setScale(2);
system.debug(rounded);
Decimal toRound = 3.14159265359;
Decimal rounded = Math.round(toRound, 2);
system.debug(rounded);
Decimal toround = 3.14159265;
Decimal rounded = toround.setScale(2);
system.debug(rounded);
I tested it in Dev console.
Decimal toround = 3.14159265;
Decimal rounded = toround.setScale(2);
system.debug(rounded);