You need to sign in to do that
Don't have an account?
Hithesh Saicharan
Add comma in currency in APEX
I want to convert this decimal value 10600.05 into 10,600 in APEX. and I am trying with this code
But I am always getting
10 600 as output. Comma is not coming in output. I want this only in APEX and in VF page. Any help please?
Decimal rA = 10600.86; Integer Intval=ra.intvalue(); List<String> args = new String[]{'0','number','###,###,###,###'}; String s = String.format(Intval.format(), args);
But I am always getting
10 600 as output. Comma is not coming in output. I want this only in APEX and in VF page. Any help please?
try with below code in dev console.
Refer the below link.
https://salesforce.stackexchange.com/questions/118624/how-to-format-number-with-comma-in-apex
If this helps, Please mark it as best answer.
Thanks!!
https://salesforce.stackexchange.com/questions/118624/how-to-format-number-with-comma-in-apex
If not working then provide the VF page and apex class.
Thanks!!
try this,
It works look at the screenshot.
try this:
It works look at the screenshot.