You need to sign in to do that
Don't have an account?
pelika Gupta 2
Formatting numbers in Apex:outputtext to include space between numbers
Below is the code used to display Amount where thousand separator is comma :
<apex:outputText value="{0, number, ###,###,###,###}"> <apex:param value="{!family.totalSalesPlanAmount}"/> </apex:outputText>
Original number: 12123
RESULT after formatting: 12,123
But i want to display thousand seperator as space. Eg: 12 123 (french format)
i have tried below codes but not able to achieve success:
<apex:outputText escape="false" value="{0, number, ### ### ### ###}">
it gives me result: 12123&16
CAn you please help me to format the number in french format where thousand separator is space
<apex:outputText value="{0, number, ###,###,###,###}"> <apex:param value="{!family.totalSalesPlanAmount}"/> </apex:outputText>
Original number: 12123
RESULT after formatting: 12,123
But i want to display thousand seperator as space. Eg: 12 123 (french format)
i have tried below codes but not able to achieve success:
<apex:outputText escape="false" value="{0, number, ### ### ### ###}">
it gives me result: 12123&16
CAn you please help me to format the number in french format where thousand separator is space
Can you not use apex:outputField instead of apex:outputText?
If your field is currency type, formatting is automatically taken care of by apex:outputField, based on the user's currency setting.
This is a tricky situation.
I guess you need to format the text in APEX code before displaying it in the VF page.
Even though it is lot of custom coding, I cannot think of another way.
Let me know if this helps.