Loading

Date Not Displayed in Date/Time Merge Fields in Salesforce Email Templates

Date de publication: Jun 11, 2026
Description

In Salesforce, some fields display both a date and time on a record page but show only the date when used as a merge field in an email template. This happens because the field is a Date field, not a Date/Time field — and these two field types behave differently in merge field contexts.

Résolution

Date and Date/Time fields in Salesforce are distinct field types and cannot be used interchangeably, even when they appear similar in name.

Why Date/Time Fields Show Only the Date in Email Templates

The field name alone does not indicate whether a field is a Date or Date/Time type. For example:

  • Date/Time fields (store date AND time): Created Date, Last Modified Date
  • Date fields (store date only): Last Activity Date

This is why the time may not appear when using a merge field in an email template, even though the field shows both date and time in the Salesforce record UI. The template is pulling from a Date field which has no time component.

How to Display Only the Date from a Date/Time Field

If you have a Date/Time field and want to display only the date in an email template merge field, use the DATEVALUE function to convert it to a date-only value.
Example: To show only the date portion of a case's Created Date, use this merge field expression in your email template: {!DATEVALUE(Case.CreatedDate)}
The DATEVALUE function converts a Date/Time field (which includes both a date and time) into a Date-only value suitable for display in templates.

Real-Life Scenario

A sales rep creates an email template and includes the merge field for "Last Activity Date." In the email, only the date appears (for example, "June 10, 2026") with no time shown. This is expected and correct behavior — Last Activity Date is a Date field and does not store a time component. If the rep needs to show a time, they should use a Date/Time field such as Last Modified Date instead.



For further information, you can read more here: Using Date, Date/Time

Numéro d’article de la base de connaissances

000385613

 
Chargement
Salesforce Help | Article