How To: Display Dates in Different Formats
Format Salesforce dates into readable US, long, European, or custom date patterns.
Last updated
Was this helpful?
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.
You need to show dates in readable formats rather than the database format (YYYY-MM-DD).
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
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
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?
Was this helpful?
{{!Opportunity.CloseDate format-date="MMMM"}}{{!Opportunity.CloseDate format-date="yyyy"}}
