Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am displaying attributes that are of type Number (18,0) in an email using a Visual Force template. I am referenced the attributes in the template in the normal way. However, they are displayed as:


Whereas I want them displayed as


Any ideas what I have to do here?

share|improve this question
up vote 2 down vote accepted

Maybe like in that example from salesforce:

<apex:outputText value="{0, number, integer}">
    <apex:param value="{!someDouble}" />
share|improve this answer

Check the expression functions reference, you should find something that fits.

{!ROUND(myObject__c.myField__c,0)} maybe?

Or even {!SUBSTITUTE(TEXT(myObject__c.myField__c), '.0', '')}

But if it's VF page template - mast0r's answer is the preferred way as it gives you more control (my formulas can still be used if you have plaintext email for example).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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