Loading

Date not displayed in 'Date Time' merge fields in email template

Udgivelsesdato: May 19, 2023
Beskrivelse

There are date fields, such as Message Date, are displayed with a date and a time on a record, but are displayed with a date when used in an email template. This is because the field is a Date field, not a Date/Time field.

Løsning

Date and date/time fields cannot be used interchangeably. The name alone doesn't indicate if a field is a date or date/time field. For example, Created Date and Last Modified Date are date/time fields, while Last Activity Date is a date field.

This explains why the time may not show up when using a merge field in a template, even though it shows the date and time in the UI.

If you need a Date/Time field to only display the date in a merge field, use the DATEVALUE function to convert a date/time field into a date field. For example, use {!DATETIMEVALUE(Case.CreatedDate)}.

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

Vidensartikelnummer

000385613

 
Indlæser
Salesforce Help | Article