Below Sample Code can fulfill your requirements. Hope this will work for you.
<apex:outputText value="{0, number, ###,##0}" id="myNumberDisplay" > <apex:param value="{!myNumber}"/> </apex:outputText> Use apex:outputText with apex:param to format the text. as you are using datatable so it will look like
<apex:column> <apex:facet name="header">Owner</apex:facet> <apex:outputText value="{0, number, ###,##0}" id="myNumberDisplay" > <apex:param value="{!myNumber}"/> </apex:outputText> </apex:column> In controller you can try this
Decimal rA = 1298763.86; List<String> args = new String[]{'0','number','###,###,##0.00'}; String s = String.format(rA.format(), args); System.debug(s);
Please mark this as best answer if this solves your problem.
Below Sample Code can fulfill your requirements. Hope this will work for you.
<apex:outputText value="{0, number, ###,##0}" id="myNumberDisplay" >
<apex:param value="{!myNumber}"/>
</apex:outputText>
Use apex:outputText with apex:param to format the text. as you are using datatable so it will look like
<apex:column>
<apex:facet name="header">Owner</apex:facet>
<apex:outputText value="{0, number, ###,##0}" id="myNumberDisplay" >
<apex:param value="{!myNumber}"/>
</apex:outputText>
</apex:column>
In controller you can try this
Decimal rA = 1298763.86;
List<String> args = new String[]{'0','number','###,###,##0.00'};
String s = String.format(rA.format(), args);
System.debug(s);
Please mark this as best answer if this solves your problem.
Thank you,
Ajay Dubedi