How To Use Date Range in NetSuite Saved Search Criteria
This is a short article on how to use date ranges in NetSuite in a saved search. This method uses a CASE WHEN statement inside of a Formula (Numeric) Result.
The goal in this example is to get a count of how many customers placed their first order in either 2020 or 2021. Since we are using specific dates, we need to convert the string of our date ’01/01/2020′ to a date format. We are also using BETWEEN to convey the two date ranges.
CASE WHEN {firstorderdate} BETWEEN TO_DATE('01/01/2020','mm/dd/yyyy')
AND TO_DATE('12/31/2020','mm/dd/yyyy') THEN 1 ELSE 0 END
Then use the summary type “Sum” to total how many customers placed their first order in this date range. Repeat it in a second formula and replace the date range to 2021.