Take the 2-minute tour ×
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.

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:

18.0
16.0

Whereas I want them displayed as

18
16

Any ideas what I have to do here?

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

Maybe like in that example from salesforce:

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

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
add comment

Your Answer

 
discard

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.