ANS-0104 · SAVED SEARCHES & FORMULAS
How to Calculate the Time Interval Between Dates in a NetSuite Saved Search?
This guide demonstrates how to compute the total number of days between the earliest and latest dates for grouped records.
Short answer
To calculate the interval, create a Formula (Numeric) column in your saved search. Set the Summary Type to Maximum and use the formula `MAX({date}) - MIN({date})`. This will return the difference in days between the latest and earliest dates for each grouped record, such as by employee.
Scenario
Users often need to determine the duration between the earliest and latest recorded dates for specific entities within NetSuite. This typically involves calculating the total number of days elapsed from the first recorded event to the most recent one, often grouped by a specific criterion like an employee.
Solution
To compute the interval between the earliest and latest dates in a NetSuite saved search, configure a new column as follows:Field: Formula (Numeric)Summary Type: MaximumFormula: MAX({date}) - MIN({date})This configuration will return the total number of days between the latest and oldest recorded dates for each grouped entity. For example, if grouping by employees, it will show the interval for each employee.
Expert NetSuite Support
Need help with this NetSuite issue?
Saved Searches & Formulas consulting and configuration support
