function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PamSalesforcePamSalesforce 

currency formatting

Hi,

 

I have a field defined as currency(6,2)

and i want to display it in visualforce page as 123.333,90 €

i am currently using <apex:outputText value="{0,number,###,###.00} €/ anno">

but this displays the currency as 123,333.90 €

 

Best Answer chosen by Admin (Salesforce Developers) 
ThomasTTThomasTT

I'm pretty sure that <apex:smileysurprised:utputText value="{0,number,###.###,00} €"> shows 123.333,90 € (this doesn't work, sorry), but if you are talking about automatic currency formatting with the locale setting, I doubt it works.

I ended up with formatting by myself with using the SFDC formatting for the integer part, and figuring out the floating point character with 

 

double d = 1.1;

string floatingPointChar = d.format().replaceAll('1','');

 

and adding floating part by myself. I did it for Canadian-French and US users.

That's one of stupid things I did and I had to do.

ThomasTT

Message Edited by ThomasTT on 09-29-2009 11:54 AM

All Answers

HarmpieHarmpie
Did you try setting your locale to another value (User preferences), this should impact the display of currencies.
PamSalesforcePamSalesforce
Yes, my locale settings are Italian.
ThomasTTThomasTT

I'm pretty sure that <apex:smileysurprised:utputText value="{0,number,###.###,00} €"> shows 123.333,90 € (this doesn't work, sorry), but if you are talking about automatic currency formatting with the locale setting, I doubt it works.

I ended up with formatting by myself with using the SFDC formatting for the integer part, and figuring out the floating point character with 

 

double d = 1.1;

string floatingPointChar = d.format().replaceAll('1','');

 

and adding floating part by myself. I did it for Canadian-French and US users.

That's one of stupid things I did and I had to do.

ThomasTT

Message Edited by ThomasTT on 09-29-2009 11:54 AM
This was selected as the best answer
PamSalesforcePamSalesforce

Hi,

 

The code works fine for both American and European format.

My system had English(US) settings so it showed american format.

I had asked my client to check if it showed proper European format and it did.

 

 

Thanks all.