Currency format using Apex:outputText

Currency format using Apex:outputText is very easy, The advantage of using Apex:outputText for showing a currency is it always respects the currency of the current user.

Below is one example, where we will see how we can format a number into a currency. CurrentFormatController is an apex class.

Visualforce code for our example is kept very simple, It will look like the below

The final output of the above code will be

$799.99

Showing dollar currency symbol as per the current user, If user has different currecny it will show accordingly.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.