Recently, I was working on an account report when the sales manager asked me to create a report on the opportunity object. They want to display only records whose close date is less than 1 Jan. 2024. To create a report, we need to apply a filter on the date field, and we have a relative date filter in the Salesforce report that makes the task easy.
Here, I will explain to you how to apply date and relative date filter in Salesforce reports and list view. In that, we will discuss the following topics:
- Date Filter in Salesforce.
- Example 1: Apply Date Filter in Salesforce List Views.
- Example 2: Apply Date Filter in Salesforce Report.
- Relative Date Filter in the Salesforce.
- Example 3: Apply Relative Date Filter in Salesforce Report.
Date Filter in Salesforce
The Salesforce Report’s date filter only supports the Standard and Custom Date Fields. Using the date filter, we can do time-based analysis, specific time durational performance analysis, comparative analysis, and other things.
It helps us create a more structured and understandable report and analyze and visualize data.
Group by Dates in Salesforce Reports
In Salesforce, we have a feature as filter records Grouped by Months, Years, and Weeks termed grouping.
In grouping by date, we organize a group of data using date-related criteria. For example, we can group opportunities by close date to see closed opportunities or cases by product to see the number of cases for each product.
Example 1: Apply Date Filter in Salesforce List Views
For example, on the account object list view, we want to display only those records whose Due Date__c is greater than 01/01/2024.
I have explained how to use the date filter on the list view in Salesforce in the following steps.
1. In the Account List View, in the Due Date field, you can see all date records. But we need only those records whose due date is greater than 01/01/2024.

2. To apply Date Filter, click on the Funnel icon.
- Then click on the Add Filter option.
- Now, we need to add the Field to which we want to apply the date filter. I have selected the due date field.
- Then select Operator as per your requirement.
- Then, enter Value.
Then click on the Done button and Save the filter.

3. When you click on the Save button, you will see only those records whose due date is greater than 01/01/2024 in the Due Date field.

This is how we can use the date filter on the list view in Salesforce.
Example 2: Apply Date Filter in Salesforce Report
When we need to filter records for particular dates only, we use a date filter. Here, I have explained the steps to filter records between dates.
In the following steps, I have explained how to use a date filter to achieve the above requirement.
1. Go to “App Launcher” -> Search “Reports” -> Click on Reports. Then click the New Report button.

2. Go to All category -> to select a report type, search “Leads.“ You can search for the object on which you want to create a report. -> Select Leads.

3. Then, remove the Default Filter to display all records. Here, you can see in the Created Date field all date records displayed.

4. Configure Custom Date Range:
- Click on the Filter option.
- Select the date on which basis you want to filter records. Here, I have selected the Created Date.
- Select Range as Custom.
- Select Start and End Date.
- Click on the Apply button.

5. After that, you will see the report’s created date displayed by the defined Date Range.

This is how we can use the date filter in the Salesforce report.
Relative Date Filter in the Salesforce
The relative date filter allows us to apply a filter to a date field using informal wording, easy-to-understand syntax, and human-speech-inspired wording.
For example, If you want to display records where the close date field is less than 1 Jan. 2024(Cuurent Year), instead of “Close date – Less than – 1 Jan. 2024”, we can write “Close date – equals – Last Year.”
Let’s create a report using the relative date filter in Salesforce.
Example 3: Apply Relative Date Filter in Salesforce Report
Using the following steps, we will create a report on the Opportunity Object where we will use Salesforce’s relative date filter to display only those opportunity records whose close date is less than 1 Jan. 2024.
1. Go to “App Launcher” -> Search “Reports” -> Click on Reports. Then click the New Report button.
2. Go to All category -> select a Report Type, Search “Opportunities.“ You can search for which object you want to create a report. -> Select Opportunities.

3. Remove the Default Filters. Then, you will see all records displayed in the report.

4. Now, we want to apply the “Relative Date Filter.” To do that, click on the Filter option, choose the field “Close Date,” and Select the operator “equals.”
5. In the Relative Date field, you can type values like YESTERDAY, TODAY, TOMORROW, NEXT 30 DAYS, and LAST QUARTER. Here, I have entered “LAST YEAR” as per our example. -> Click on Apply.

6. After that, you will see in the report the records are sorted with a close date field for the Last Year; if the present year is 2024, then the records are sorted from 2023.

This is how we can use the relative date filter in Salesforce.
Conclusion
I hope you have an idea about the date and relative date filters in Salesforce. In that, I explained what date and relative date filters are. Then, we saw how to apply date and relative date filters in the Salesforce reports and Salesforce list views with different examples and step-by-step explanations.
You may like to read:
- How to Create Date Time Field Type in Salesforce
- Salesforce Formula Add Hours to Datetime
- Salesforce DATE Function
- How to Use Add Filter Logic in Salesforce Report
- How to Create Salesforce Report Group by Week And Quarter
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.