In Salesforce, the LastActivityDate field is a system field that stores the date of the most recently logged activity (such as a task, event, call, or email) on a record. Standard objects like Leads, Contacts, Opportunities, and Accounts include this field by default when you create a report.
This article explains how to create a custom formula field on a Salesforce object that calculates and displays the number of days since the last activity occurred on that record. The same formula can also be used in reports to filter or sort records by activity recency.
Use the following steps to create a Number formula field using the formula TODAY() - LastActivityDate. This formula subtracts the date of the last activity from today's date and returns the number of days elapsed.
TODAY() - LastActivityDateLastActivityDate field. Refer to the Salesforce Object Reference (API Guide) to check if your object supports it.Salesforce Object Reference — API Guide
000387468

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.