Convert Date to Text Using Formula in Salesforce

In Salesforce, Date fields always show in standard date format, like YYYY-MM-DD. But sometimes, we need the Date in Text format for emails or reports.

Salesforce does not directly allow us to change Date to Text without using a formula.

For example, if we are sending an email and want to include the Date field, it will display in system format (YYYY-MM-DD). This may not look good for end users. By converting the Date into Text using a formula, we can show it as “September 17, 2025.”

In this article, we will learn about how to convert a date to text using a formula in Salesforce. In this, I will create and explain a formula using functions that display dates in text format.

Salesforce Formula Date to Text

In Salesforce, to convert the date field to a text data type, we use the Salesforce DATE() and TEXT() functions together.

Here is the syntax to convert a date to text in Salesforce:

TEXT(DATE(datefield))
#OR
TEXT(datefield)

In this code, enter the API name of the date field you want to convert to time for the Date Field. And this formula returns a new date in text format.

Let’s understand it in detail with the help of an example:

Let’s say we want to create a formula that returns only a year, but without the number place separated with commas. So, for this, we will create a formula that converts a Year to Text in Salesforce.

Here is the formula for this:

TEXT(YEAR(datefield))

Convert Date to Text Using Formula in Salesforce

Here are the steps to convert a Date to Text using the Advanced Formula in Salesforce Lightning.

  1. Go to the Gear Icon. -> Click on the Setup. -> Select the Object Manager tab. 
Salesforce Formula Date to Text
  1. Search for the object to which we want to convert the Date to Text. Here, I select the Accounts object from the list of objects.