Activity Forums Salesforce® Discussions How to display the formatted number / date in Salesforce Visualforce? Which component should be used?

  • shariq

    Member
    September 22, 2018 at 9:58 pm

    Use component “<apex:outputText>”.
    Example: Format the number into currency.

    <apex:outputtext value="{0, number, 000,000.00}">
    <apex:param value="{!valFromController}" />
    </apex:outputtext>

    OR

    <apex:outputtext value="{0, number, ###,###.00}">
    <apex:param value="{!valFromController}" />
    </apex:outputtext>

  • Parul

    Member
    September 23, 2018 at 4:53 am

    code snippet

    <td style="white-space:nowrap;">
    <apex:inputText value="{0,StartDateTime,MM'/'dd'/'yyyy}" disabled="true" >
    <apex:param value="{!evento.StartDateTime}" />
    <apex:inputText>
    </td>

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos