If you have a significant date in Salesforce and want to run a report that includes that date and to determine how many days have passed between that date and another date, a row-level formula can be used or you can add a Formula field if you need to utilize it for several reports.
Row Level Formula:
1. Go to the Reports tab.
2. Click on the New Report button.
3. Select a Report Type for your target Object such as Leads.
4. Select Start Report.
5. Click on Columns drop-down arrow and select Add Row-Level Formula.
6. Enter a Column Name.
7. Build your formula by selecting your first date field and subtracting it from another date field.
8. Select Validate.
9. Click Apply.
Formula field:
1. Go to Setup.
2. Go to Object Manager.
3. Click on your target Object.
4. Select Fields & Relationships
5. Select the New button.
6. Select Formula and click Next.
7. Enter a Field Label name.
8. Build your Formula field by selecting Number as the Formula Return Type and click Next.
9. On the New Custom Field screen, select your first date field and subtract it to another date field.
10. Click on Check Syntax.
11. Select Next and Save.
The following video walks through both methods — the Row-Level Formula and the Formula Field approach — for calculating the number of days between two dates.
Note:
**If your date field stores both a date and a time (Date/Time data type), wrap it in the DATEVALUE() function to extract the date portion before subtracting.
**When creating a formula field, avoid using &BR() function as this will limit the availability of the field to be used in row-level formula.
Build a Formula Field
Write a Row-Level Formula
Sample Date Formulas - Including date and time
If you don't see the formula you need, visit the Trailblazer Community group - Formulas - Help, Tips and Tricks
000393431

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.