In Salesforce, DateTime fields always include both the date and the time, for example: 28-Aug-2025 3:45 PM. However, in many business scenarios, users only need the date.
For example, we want formulas that require comparison with TODAY(), such as checking if a follow-up DateTime matches today’s date. Since TODAY() only returns the date, you need to convert DateTime to Date first.
Because of this, we need to convert DateTime into Date to make data easier to use, compare, and understand.
In this article, we will learn about how to convert a DateTime to a Date in Salesforce Formula. Moreover, we will go through the steps to display the date from the DateTime field in Salesforce.
Convert DateTime to Date in Salesforce Formula
In Salesforce, Datetime and Date are different data types. To perform any operations or comparisons on Date and Datetime values, we always need to convert them to the same data type.
So, to convert a DateTime field to a Date field using the advanced formula, we use the DATEVALUE() function of Salesforce.
Here is the syntax to convert a DateTime to a Date in Salesforce:
DATEVALUE(datetimefield)Example: Create a Formula Field to Display Date From a DateTime Field in Salesforce
Below, I will explain how to extract and display the only Date value from a given DateTime field, allowing it to be used in formulas, reports, or automation within Salesforce.
- Here, you can see that the account object contains a Current Date Time field, which displays the date and time value. But we only want to display the date so that we can create the formula field on this object.

- Go to the Gear Icon. -> Click on the Setup. -> Select the Object Manager tab. Select the Object on which you want to create the Formula Field to extract the year from the date. Here, I’m going to create an Account Object.
- In the account setup, click on the Fields and Relationships to create a new field and click the New button.

- In this step, we will use a formula to convert the DateTime value to display only the Date value from the given DateTime field and display it on the account object. To do this, select the Formula option from the data type and click Next.

- Next, provide the Field Label and API Name for the formula field. Then, since we want to display only the Date value of the given DateTime field, in the Formula Return Type, select Text and click on the Next button.

- In the formula editor, enter the formula below and click the Next button. Then select the Function from and click the Insert Selected button to use them. Then, add the date field from the object.
DATEVALUE(Date_Field)- In this formula, we convert the DateTime field called “current_date_time__c” to the date field using the DATEVALUE() Salesforce function.

- Select the Field Level Security for the formula field, and select the profiles to make the field visible for the profiles. The field will be visible for the profiles selected from the Visible column.
- After selecting the profiles, click on the Next button.

- In this step, we must select the field’s visibility on the object’s page layouts. In this case, we have created the formula field for the reports so we can choose not to display it on the page layouts.
- Uncheck the checkboxes of the page layouts to prevent the field from displaying on them. After this, click on the Save button.

We have now created the formula field that returns the date value from the Current Date Time field of the account object.
As you navigate to the object, you will see the formula field that you created to extract and display the date value from the datetime field.

In this way, we can create a formula field to store the extracted date from the given datetime field in Salesforce.
Conclusion
I hope you have got an idea about how to convert a DateTime to a Date in Salesforce Formula. Moreover, we have gone through the steps to display the date from the DateTime field in Salesforce.
You may like to read:
- Create Cross-Object Formula Field in Salesforce
- Use Date Formula in Salesforce Report
- Create Row-Level Formula in Salesforce Report
- Salesforce Formula If Date is Less Than Today
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.