How to add 1 month to Date in Salesforce

In this salesforce tutorial, we will learn how to add 1 Month to Date in Salesforce. Moreover, we will go through steps using which we can add 1 month to date in Salesforce Lightning and Salesforce Classic.

While working in an organization that uses salesforce as a CRM tool, I got a task where I need to set the next appointment date with a client. So, to fulfill this requirement, I use the AddMonth functionality of Salesforce.

If you want to learn How to Add 1 Month to Date using Salesforce Lightning and Salesforce Classic, you have come to the right place.

The following are the topics that we will cover in this salesforce tutorial:

  • Salesforce AddMonths Function
  • Applications of ADDMONTH Function in Salesforce
  • How to Add 1 Month to Date in Salesforce Lightning
  • How to Add 1 Month to Date in Salesforce Classic

Salesforce AddMonths Function

The ADDMONTHS functionality in Salesforce can be used to add or take away a certain number of months from a specified date. This function is used to manage dates, in numerous examples related to sales and marketing in salesforce.

Here, is the syntax of the ADDMONTHS:

ADDMONTHS(object_name, number of month to be added/subtracted)

Now, Let’s discuss an example of how to use the ADDMONTHS function in Salesforce to clearly understand the concept.

Suppose, we have a custom field named “Previous Campaign Date” on a campaign object, and we get a task to calculate the upcoming date of the campaign, after a duration of one month.

So, in this case, we will use the ADDMONTHS function in a formula field and calculate the “Upcoming Campaign Date” on a campaign object.

The formula would look something like this:

ADDMONTH(Previous_Campaign_Date, 1)

It will add 1 month to the Previous_Campaign_Date field and return the resulting date by adding 1 month to it as defined in the formula field.

So, with this, we got an overview of the ADDMONTH function with syntax and examples in Salesforce. Now, we will move ahead and see some real-life applications where we utilize the ADDMONTH function in salesforce.

Read: How to add Formula Field in Salesforce Report

Applications of ADDMONTH in Salesforce

Here are some typical salesforce use cases for the ADDMONTH function.

  • ADDMONTH function is used while forecasting the expected closed date of sales opportunities.
  • It is also used to calculate the next date and end date of the Salesforce campaign.
  • To forecast the due dates of the payment, the sales team can use the ADDMONTH function.
  • The service and sales team can utilize this function to calculate the next delivery date of the product.
  • This function helps the teams that deal with products and services that offer subscriptions, to calculate the renewal date of the subscription and the next payment date of the subscription.
  • It also helps the sales team to forecast the expiry date of the warranty of the product or service.

So, with this, we have learned some applications of the ADDMONTH function in Salesforce. Now, we will move further and see how to Add 1 Month to Date in Salesforce Lightning.

How to Add 1 Month to Date in Salesforce Lightning

Here are the steps to Add 1 Month to Date in Salesforce Lightning Edition:

  • Log in to your Salesforce account and navigate to Setup. Then from the left-hand menu, click on Object Manager.
How to Add 1 Month to Date in Salesforce Lightning
Add 1 Month to Date in Salesforce Lightning
  • Click on the object for which you want to create a custom field. Here, I select the Campaign Object from the list of objects.
How to Add 1 Month to Date in Salesforce Lightning Example
Add 1 Month to Date in Salesforce Lightning Example
  • Click on Fields & Relationships in the left-hand menu of the object page.
How to Add 1 Month to Date Example in Salesforce Lightning
Add 1 Month to Date Example
  • Click on the New button to create a new field and relationship.
Add 1 Month to Date in Salesforce Lightning
Add 1 Month to Date in Salesforce Lightning
  • Choose the type of field you want to create. Here, we have to select the Formula field type. Then Click on the Next button.
Add 1 Month to Date in Salesforce Lightning Example
Custom Formula Field in Salesforce Lightning
  • Fill in the required information for the field. Here, I set Field Label to Upcoming Campaign.
  • The Field Name field will be automatically populated. Choose the Date as the Formula Return Type. Then Click on the Next button.
Add 1 Month to Date Example in Salesforce Lightning
Add 1 Month to Date Example in Salesforce Lightning
  • Enter the formula to add 1 month to date. Suppose, I want to determine the date of the Upcoming Campaign based on the Campaign Created Date.
  • From the left-aligned Functions List, select the ADDMONTHS function. Next, click on the Insert Selected Function button.
  • Move your cursor in the parenthesis and erase the date.
  • Click on the Insert button and select the field that we want to choose as a date, then click the Insert button again. Here, I select the Created Date field from the Campaign.
  • Now, replace the num with the month value that we want to add or take away from the specified date. Here, I set it to 1 as our objective is to add 1 month to the date.
  • Click on the Check Syntax button to check for errors.
  • Optionally, we can add the Description and Help Text. Here, I add the Description as One Month Add to Campaign Created Date.
  • Now, specify how you want to handle the blank field. Here, I set it to Treat blank fields as blanks.
  • Click on the Next.
How to Add 1 Month to Date in Salesforce Lightning
Salesforce Lightning Add 1 Month to Date Field
  • Configure field-level security. Here, I set it to Visible to all by checking the Visible checkbox. Then Click on Next, to continue.
How to Add 1 Month to Date in Salesforce
Add 1 Month to Date in Salesforce
  • Click on Save to save the new custom field.
How to Add 1 Month to Date in Salesforce example
Add 1 Month to Date in Salesforce Example
  • Once the formula is applied to the field, open the campaign object and select any campaign. After that, click on the Details section and here we will get the newly created field that adds 1 month to the date.
Add 1 Month to Date in Salesforce
Add 1 Month to Date Field in Salesforce Lightning

With this, we have learned to add 1 month to date in Salesforce Lightning Edition. Now, we will move ahead and learn to add 1 month to date in Salesforce Classic.

Read: Case Assignment Rule in Salesforce

How to Add 1 Month to Date in Salesforce Classic

Here are the steps to Add 1 Month to Date in Salesforce Classic Edition:

  • Log in to your Salesforce Classic account. Click on Avtar and then select Switch to Salesforce Classic.
How to Add 1 Month to Date in Salesforce Classic
Switch to Salesforce Classic Edition
  • Go to the Setup menu in Salesforce Classic.
How to Add 1 Month to Date in Salesforce Classic Example
Add 1 Month to Date in Salesforce Classic Example
  • Click on the Build section. Then Click on the object under Customize section for which you want to create a custom field. Here, I select the Orders object from the list of objects.
  • Click on the dropdown arrow and select Fields.
Add 1 Month to Date in Salesforce Classic
Add 1 Month to Date in Salesforce Classic
  • Scroll down to the page and click on the New button under Order Custom Fields & Relationships.
Add 1 Month to Date in Salesforce Classic Example
Add 1 Month to Date Field in Salesforce Classic
  • Choose the type of field you want to create. Here, we must have to select the Formula field type. Then Click on the Next button.
How to Add 1 Month to Date example in Salesforce Classic
Add 1 Month to Date Field in Salesforce Classic
  • Fill in the required information for the field. Here, I set Field Label to Warranty.
  • The Field Name field will be automatically populated and set to Warranty. Choose the Date as the Formula Return Type.
  • Click on the Next button.
Add 1 Month to Date Example in Salesforce Classic
Add 1 Month to Date Field
  • Create the formula to extend the date by one month. Suppose, I want to determine the Date of warranty based on the Order Start Date.
  • Choose the ADDMONTHS function from the left-aligned Functions List.
  • After that, click the Insert Selected Function button.
  • Place the cursor in the parenthesis and remove the date.
  • Choose the field we want to use as a date by clicking the Insert button, then to add click the Insert button once again. I choose the Order Start Date field from the Order in this instance.
  • In order to add or subtract a month from the supplied date, we must now change the num with the appropriate value. I’ve set it to 1 here as we want to add 1 month to the date.
  • To check any errors, click the Check Syntax button.
  • Optionally, we can include the Help Text and Description. The description is added here as a one-month addition to the order start date.
  • At this point, decide how you want to treat the empty field. I choose to treat empty fields as blanks in this instance.
  • Click the Next button.
How to Add 1 Month to Date in Salesforce Classic
Salesforce ADDMONTH Formula
  • Configure field-level security. Here, I checked the Visible checkbox to make it visible to all. To proceed, click Next.
Example to Add 1 Month to Date in Salesforce Classic
Add 1 Month to Date in Salesforce Classic
  • To save the new custom field, click Save.
Example to Add 1 Month to Date in Salesforce
Example to Add 1 Month to Date in Salesforce
  • After the formula has been applied to the field, open the order object and choose any order. You will get the newly generated field that extends the date by one month.
Example of How to Add 1 Month to Date in Salesforce Classic
Add 1 Month to Date in Salesforce Classic

With this, we learned how to Add 1 Month to Date in Salesforce Classic.

Also, check the following Salesforce tutorial.

Conclusion

In conclusion, Salesforce’s ADDMONTHS functionality is used to add or minus away a certain number of months from a specified date. Both Salesforce Classic and Salesforce Lightning provide a simple procedure to Add 1 Month to Date.

In addition to this, the following are the topics that we have discussed:

  • Salesforce AddMonths Function
  • Applications of ADDMONTH in Salesforce
  • How to Add 1 Month to Date in Salesforce Lightning
  • How to Add 1 Month to Date in Salesforce Classic