4

I am trying to change the currency format to below format

Netherlands - EUR ###.##0,00 :

Code which I am using:

<apex:page standardController="Account"> 
    <apex:outputText value="{0, number, 000,000.00}"> 
        <apex:param value="{!Account.AnnualRevenue}" /> 
    </apex:outputText> 
</apex:page>

However , It is throwing

invalid format

error. Please assist

2 Answers 2

2

Looks like this can help you: <apex:outputText value="{0, Number, Currency}"> You can also try {0, number, EUR #.##0,00}

1
  • FYI, the format #.##0,00 does not work as it is not a valid message format. There doesn't appear to be a way to change the decimal and thousands separator using the standard out of the box visualforce (without a dirty hack)
    – Ben Naylor
    Jul 24, 2017 at 10:51
1

Java MessageFormat applied as 000,000.00 supports US currency and date formats. There is an Idea here you can vote on as it asks for specific tag for currency.

Workarounds:

  1. Use <apex:outputField> as it will obey the locale settings of the currently logged in user. But it will work only if you are referencing a SObject.
  2. Format the currency in Apex and show the formatted value in Visualforce.
2
  • Is there any reference code ? I have tried but still not working Mar 29, 2016 at 18:05
  • Can you try <apex:outputField value="{!Account.AnnualRevenue}" /> Mar 29, 2016 at 18:09

You must log in to answer this question.

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