Print this page

Number Type Fields in Visualforce Email Template

Knowledge Article Number 000181753
Description The number type fields are returning the value as 98.0, even when the actual value inserted is 98.
Resolution

 
We can use Floor() function to convert the number type field value from decimal to integer.

<apex:outputText value="{0, number, integer}">
    <apex:param value="{!someDouble}" />
</apex:outputText>
 
This behavior is also observed on visualforce page:
 
We can use Floor() function like this:-
 
Solution:
 
{!FLOOR(myobj.number_field__c)}




promote demote