0

I don't want my date and time to show up GMT on a custom visualforce page. I have a date/time field I'm pulling in from the opportunity here is my VFP code:

    <div class="slds-truncate slds-text-body_small">
    <p>Pricing Due {!ThisOpportunity.Pricing_Due_Date_Time__c} </p></div>

It displays like this though

Pricing Due Thu May 25 16:00:00 GMT 2017

  • Use outputfield or java messaging format. Same as when not using slds – Eric May 19 '17 at 20:35
  • How do you like to see the format? – Santanu Boral May 19 '17 at 21:25
1

You could use apex:outputText to show the formatted date:

<div class="slds-truncate slds-text-body_small">
    <p>Pricing Due 
        <apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
            <apex:param value="{!ThisOpportunity.Pricing_Due_Date_Time__c}" /> 
        </apex:outputText>
    </p>
</div>

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.