How to show different currency format. How to change the amount format. Examples of using different types of formats for currency and amounts.
EUR {!relatedTo.Amount} – is simple to show the amount from Opportunity.
In some cases you will have to use apex:
1 |
<apex:outputText value="EUR{0, number, ###,###,##0.00}"><apex:param value="{!relatedTo.Amount}"/></apex:outputText> |
This parts shows how the amount will look like : ###,###,##0.00
You can add the currency code like here: value=”EUR… where CHF is a currency code
DON’T forget to put html blank value before <apex:outputText>: to be sure to have a space between the text and the date:
1 |
&nbsp; |
Examples of currency code format in Visualforce email templates. Salesforce.
Example 1:
1 |
<apex:outputText value="EUR{0, number, ###,###,##0.00}"><apex:param value="{!relatedTo.Amount}"/></apex:outputText> |
Will show like: EUR 1,000.00
Example 2:
1 |
<apex:outputText value="CHF{0, number, ### ### ##0.00}"><apex:param value="{!relatedTo.Amount}"/></apex:outputText> |
Will show like: CHF 1 000.00
Example 3:
1 |
<apex:outputText value="CHF{0, number, ### ### ##0}"><apex:param value="{!relatedTo.Amount}"/></apex:outputText> |
Will show like: CHF 1 000
Read more: Date and time format in Visualforce email template. Salesforce.