For the complete documentation index, see llms.txt. This page is also available as Markdown.

How To: Display Dates in Different Formats

Format Salesforce dates into readable US, long, European, or custom date patterns.

Use format-date when you want readable output instead of the default database date format.

Problem

You need to show dates in readable formats rather than the database format (YYYY-MM-DD).

Solution

US Format (Month/Day/Year):

{{!Opportunity.CloseDate format-date="MM/dd/yyyy"}}

Result: 01/15/2024

Long Format:

{{!Opportunity.CloseDate format-date="MMMM dd, yyyy"}}

Result: January 15, 2024

European Format:

{{!Opportunity.CloseDate format-date="dd.MM.yyyy"}}

Result: 15.01.2024

With Day of Week:

{{!Opportunity.CloseDate format-date="EEEE, MMMM dd, yyyy"}}

Result: Monday, January 15, 2024

Just the Month:

Result: January

Just the Year:

Result: 2024

Date Pattern Reference

Pattern
Meaning
Example

yyyy

4-digit year

2024

yy

2-digit year

24

MMMM

Full month name

January

MMM

Short month name

Jan

MM

Month number (01-12)

01

dd

Day with leading zero

05

d

Day without leading zero

5

EEEE

Full day name

Monday

EEE

Short day name

Mon

Tips

  • Patterns are case sensitive. MM means month. mm means minutes.

  • Month and day names always render in English.

  • Create formula fields for other languages when needed.

Last updated

Was this helpful?