I have an visual force email tempalte however the currency field is giving me some problems:

We are writing to advise you that an amount of £{!relatedTo.Amount__c} is outstanding on your account

This works ok however if the amount is £200.00 when the email is sent it displays as £200.0

The same thing happens if this is £200.50 it will show as £200.5

It works correctly when the amount is e.g £200.11

Can anybody help?


You can use this:

<apex:outputText value="{0, number, 00.00}">
      <apex:param value="{!relatedTo.Amount__c}" />
  • You're welcome! Have a nice day. – Martin Lezer Nov 27 '15 at 14:54
  • quick question - do you know how I would get the currency sign infront of figure for example £200.00 – Josh Austin Nov 27 '15 at 15:17
  • I think you can had '£' before '{0, number, 00.00}' in the value attribute of the ouputtext. – Martin Lezer Nov 27 '15 at 15:23
  • Hi Martin I have tried this but seems to be attaching it to the word before the currency amount like below: an amount of£ 136.25 is outstanding? any ideas? – Josh Austin Nov 27 '15 at 15:42
  • Hi Josh ! I'm sorry I don't understand why it's not working. Maybe you can try this: <apex:outputText value="{0, number, £00.00}"> – Martin Lezer Nov 27 '15 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.