-2

I have a formula Currency field. My customer wants below format.

1.000,00 €

599,40 €

85,00 €

1,00 €

I tried using the below format and this is not exactly what I am looking for.

<apex:outputText value="${0, number, ###,###,###,##0.00}">
    <apex:param value="{!quot1.Ancillary_Weekly_Charge_Total__c}" />
</apex:outputText> €

What changes should I do to the above code or How can I populate the exact format?

1 Answer 1

1

Using the documentation here and a little bit of research I made this example and tested using Opportunity object along with its Amount field.

And also special thanks to @Scott Pelak for his comment from this thread. Where he explained the usage of ###,###,##0.00 very well.

<apex:outputText value="{0, number, ###,###,##0.00}">
     <apex:param value="{!Opportunity.Amount}" />
</apex:outputText>
<apex:outputText> €</apex:outputText>

Or you could also use the tag like this. Thanks to this thread:

<pre>
    <apex:outputText value="{0, number, ###,###,##0.00}">
        <apex:param value="{!Opportunity.Amount}" />
    </apex:outputText> €
</pre>

I noticed for me using the pre tag changes formatting a little bit. Please change the code above to fit your requirement :) Hope it helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .