Find your content:

Search form

You are here

Date format in email template


I need to format a date field in Visual Force email template so that it is of the form:

December 5, 2012

I check date format guidelines in force documentation and find this:

I don't think this does not give me the full range of options available. Anyone got a link which does?

Attribution to: dublintech

Possible Suggestion/Solution #1

I think here you will be needed an apex method, something like this:

public List<String> monthList = new List<String>{'January',

public String getDateFormatted(Date myDate)
    return monthList.get(myDate.month() - 1) + ' ' + + ', ' + myDate.year();

UPDATE: for use at the visualforce page you can use following code:

<apex:outputText value="{0,date, MMMM ,d  yyyy}">
    <apex:param value="{!NOW()}" />

See the Java documentation for all the pattern letters that can be used when formatting dates.

Attribution to: Sergej Utko

Possible Suggestion/Solution #2

TEXT(DAY(TODAY()))&" "&CASE(MONTH(TODAY()),1,"January",2,"February",3,"March",4,"April",5,"May",6,"June",7,"July",8,"August",9,"September",10,"October",11,"November","December")&" "&TEXT(YEAR(TODAY()))

Try this formula instead than coding .

Attribution to: Mohith Shrivastava
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content