I was working as a system admin for a company that uses Salesforce to handle customer support cases. Every time a new case is created, the support team must follow up within 3 days after the case is created.
Instead of manually calculating the follow-up date, we can create a formula field in Salesforce that automatically adds 3 days to the case creation date.
In Salesforce, there are many scenarios where we need to add days to a date, such as calculating an expected delivery date, the due date of a task, scheduling follow-up tasks, or determining the payment due date.
In this article, we will learn about how to add days to date using Salesforce Formula. In this, I will create and explain a formula using functions that returns the date after adding days.
Add Days to Date Using Salesforce Formula
Below, I will explain the formula and steps to add days to a given date in Salesforce, so you can automatically calculate the next date with a clear example. For this, we will use the Salesforce Date(), Today(), Year(), and Month() functions.
- 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 a Products Object.
- In the Products 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 calculate and display the date after adding days to the given date, and display it on the product object. For that, select the option Formula 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 the next date after adding days to the given date, in the Formula Return Type, select Date and click on the Next button.

- In the formula editor, enter the formula below and click the Next button.
- Here, we want to use the DATE() function to check the year and month of a given date. We need to select the Advanced Formula.
- Then select the Function from and click the Insert Selected button to use them. Then, add the date field from the object.
- Clicking the Insert Field button displays all fields from the product object. Here, we need to add an Purchase_Date__c field to display the next date after adding days in it.
DATE (YEAR (Purchase_Date__c), MONTH (Purchase_Date__c), DAY (Purchase_Date__c) + 3)Let’s understand the above formula:
- Here, using the YEAR(), MONTH(), and DAY() functions, we are extracting the year, month, and day of the given date.
- Then, on the extracted day, we add three more days. For example, if the extracted day is 03, we add 3 days, resulting in 06.
- Provide this formula and click the Check Syntax button to confirm the formula is correct, and click the Next button.

- 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 can use the formula field once we’ve created it. Let’s look at an example:
- Create a new product using the Purchase Date value by opening the Products object and saving it.
- Next, click on the Details section, and the Payment Due Date field will appear with a date value that has been adjusted by three additional days.

In this way, we can create a formula field to add days to a given date in Salesforce, so we can automatically calculate the next date.
Conclsuion
I hope you have an idea about how to add days to a date using Salesforce Formula with the DATE(), MONTH(), and YEAR() functions, so that it can be used in formulas, reports, or automation in Salesforce. In this, I have created and explained a formula using functions that returns the date after adding days.
You may like to read:
- Extract Year from Date Salesforce Formula
- Date Formula Functions in Salesforce
- Add Days to Date in Salesforce Formula
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.