0

I am formatting my date field in visual force email template using output text. the date what i have in the record is "28 december 2015" End Date -> 28 December 2015

     <apex:outputText value="{0,date,MMMM d, YYYY}">
     <apex:param value="{!relatedTo.End_Date__c}"/> 

But The value is formatted as 28 December 2016

1

yyyy--> should be small letters other wise it is rounding up the year

0

Hi Please find the below example for reference...

<apex:outputText value="{0, date, MMMM d','  yyyy}">
    <apex:param value="{!NOW()}" />
</apex:outputText>
  • not able to find any example – user6833 Jul 27 '15 at 11:35
  • still it is not working.It Is showing up the same – user6833 Jul 27 '15 at 11:50
0

This works for me:

<apex:outputText value="{0, date, d MMMM yyyy}">
    <apex:param value="{!relatedTo.End_Date__c}" />
</apex:outputText>

Output for today is: 27 July 2015. (Sorry was a little late to see that you had actually answered your own question already ;))

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.