You need to sign in to do that
Don't have an account?
lax
Problem using setscale
Hi,
I want to display a value as 123,456.99. So I write as decimal.setscale(2).format()
This is working fine for values having two digits for decimal. But say if I have an integer it displays 123,456 instead of 123,456.00. Or if a value is 123,456.90 it displays 123,456.9.
Am I missing something? Thanks.
No, I don't think you're missing anything. Hacking the string yourself may be your final solution.
If the Decimal is associated with a Currency field salesforce will correctly format it as currency. Is there some way your display can do that? e.g. are you writing visualforce code?
Best, Steve.
Hello Steve,
What I am trying to achieve(in a VF page) is to add two currency values in a decimal variable. Then display the decimal variable. Or simply just take one currency value and display it via decimal variable(wanting 123,456,678.XX format, XX can be 00 as well)