You’ve come to the right place if you want to learn about Salesforce’s Advance Formula Date Greater Than the Specific Date. Additionally, we’ll cover how to use Salesforce Lightning and Salesforce Classic to generate a formula date greater than a particular date.
I was given a task while employed by an organization to determine whether a date exceeds a certain date. It enables us to streamline workflows and processes depending on particular dates, as well as better manage and organize our data in Salesforce.
The following are the topics that we will cover in this salesforce tutorial:
- Salesforce formula to confirm if date is greater than a specific
- Formula date greater than specific date in Salesforce Lightning
- Formula date greater than specific date in Salesforce Classic
Salesforce formula to confirm if date is greater than a specific
In Salesforce, to compare a date field with a predefined date value to see if the date is greater than the particular date, we create an advance formula field that finds whether a date is greater than a particular date or not.
In Salesforce, for comparing the set date value with the date field, we use the comparison operators Greater Than (>) or Greater Than or Equal to (>=).
For example, we want to check if the Cose Date field of a Case is greater than Today. So, for this, we define a Salesforce formula that looks like as follows:
IF( CloseDate > TODAY(), "True", "False")
In this formula, the CloseDate field is compared to the result of the TODAY function. If the CloseDate is after today’s dates, the formula will return TRUE. Otherwise, it will return FALSE.
We can use this formula in many different situations, including triggering workflows and automation, sorting and filtering data, and generating fields based on particular dates, etc.
In conclusion, we have learned the formula to confirm if the date is greater than a specific one in Salesforce. Next, we will move and learn how to check the date greater than the specific date in Salesforce Lightning.
Read Remove comma from number field Salesforce
Formula date greater than specific date in Salesforce Lightning
Here, are the steps to define a formula date greater than the specific date in Salesforce Lightning.
Step 1: Click the Setup icon in the top right corner of the page to access Salesforce Setup.
Step 2: Click Object Manager from the menu’s left side.

Step 3: Look for the item to which we want to compare a date that is greater than a certain date. I choose the Product object from the list of objects in this instance.

Step 4: Choose Fields & Relationships.
Step 5: Next, select New.

Step 6: Choose the Formula as the field type.
Step 7: Click Next to proceed.

Step 8: After entering a Field Label for the formula, the Field Name will be filled in automatically. Here, I enter Field Label as the Amount + Extra Charge.
Step 9: Select Currency as the Formula Return Type. After that, click Next.

Step 10: Enter the date greater than the specific date formula in the Advance Formula editor. Here, is the formula:
IF(Payment_Due_Date__c > Purchase_Date__c + 5,
IF(Payment_Due_Date__c > Purchase_Date__c + 10, Price__c + 100, Price__c + 50),
Price__c
)
- The IF() function is used in this formula to determine whether the payment due date is greater than the Purchase Date + 5 Days.
- If so, a second IF() function is used to determine whether the payment deadline exceeds the Purchase Date + 10 Days.
- If so, the price is increased by 100 rupees “Price__c + 100”. If not, the price is increased by 50 rupees “Price__c + 50”.
- The formula returns the original price “Price__c” if the payment due date is not more than the Purchase Date + 5 Days.
Step 11: To verify that the formula is valid, click Check Syntax.
Step 12: We can specify how you want to handle the empty field and include the Description and Help Text as alternatives.
Step 13: Then, select Next.

Step 14: Select the appropriate field Level Security and to make it visible to everyone, here we select the Visible checkbox.
Step 15: Select Next.

Step 16: Select the Page Layout Name for which the formula field is to be added.
Step 17: Click Save to save the formula field.

We can use the formula field once we’ve created it. Let’s look at an example:
- Create a Product with the Payment Due Date, Purchase Date, and Price fields by opening the Products item and saving it.
- After that, click on the Details section, and here the Amount + Extra Charge field appears which shows how the formula date is greater than the specific date works.



When the Payment Due Date is greater than the Purchase Date + 10 Days.
As a result, we now know how to use Salesforce Lightning’s advanced formula date greater than a specific date. Next, we’ll look at how to use Salesforce Classic’s advance formula to check a date greater than a specific date.
Read Salesforce Last Activity Date Formula
Formula date greater than specific date in Salesforce Classic
Here, are the steps to define a formula date greater than the specific date in Salesforce Classic.
Step 1: From the Salesforce Lightning to open your Salesforce Classic edition. Click on Avtar and click Switch to Salesforce Classic.

Step 2: Click on the Setup option.

Step 3: Scroll down to the Build section. Then under Customize, select the object for whom we want to compare a date that is greater than a certain date. Here, I choose the Campaigns from the object list.
Step 4: Click on the dropdown menu and select Fields.

Step 5: As you scroll down the page, click on the New button under Custom Fields & Relationships.

Step 6: Select the Formula as the field type.
Step 7: Click Next to proceed.

Step 8: Enter a Field Label for the formula, and the Field Name will be automatically populated. Here, I enter Field Label as the Upcoming Date.
Step 9: Choose Date as the Formula Return Type and then click Next.

Step 10: Enter the date greater than the specific date formula in the Advance Formula editor. Here, is the formula:
IF(DAY( EndDate ) > 15,
DATE(YEAR(EndDate), MONTH(EndDate) + 1, 5),
DATE(YEAR(EndDate), MONTH(EndDate), 30)
)
- The IF() function is used in this formula to determine whether the Campaign End Date day of the month is greater than 15.
- If so, the Upcoming Campaign Date is set to the 5th of the next month using the DATE() method.
- The year and month of the Campaign End Date are extracted using the YEAR() and MONTH() functions, and the next month is obtained by adding 1 to the current month.
- The Upcoming Campaign Date is set to the 30th of the same month using the year and month of the Campaign End Date and the DATE() function if the day of the Campaign End Date is less than or equal to 15.
Step 11: To verify that the formula is valid, click Check Syntax.
Step 12: We can specify how you want to handle the empty field and include the Description and Help Text optionally.
Step 13: Then, click Next.

Step 14: Choose the appropriate Field’s Level Security, and then check the box Visible to make it visible to all.
Step 15: Click Next.

Step 16: Choose the Page Layout Name for which the formula field is to be added.
Step 17: Click Save to save the formula field.

Once we’ve defined the formula field, we may use it. Let’s explore an example:
- Create a new campaign with the End Date field value by opening the Campaigns tab and saving it.
- In the details section, we will get the Upcoming Date field which shows how the formula date is greater than the specific date works.


In a conclusion, we now understand the formula date greater than the specific date.
You may also like to read
- Difference between Two Datetime Fields in Salesforce
- Salesforce Formula to Calculate Days Between Dates
- Salesforce Formula to get Last Day of Month
Conclusion
In conclusion, we learned the advanced salesforce formula to check the date greater than the specific date.
Moreover, we have learned that both Salesforce Classic and Salesforce Lightning provide a simple procedure for checking the date greater than the specific date.
In addition to this, the following are the topics that we have discussed:
- Salesforce formula to confirm if date is greater than a specific
- Formula date greater than specific date in Salesforce Lightning
- Formula date greater than specific date in Salesforce Classic
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.