This article explains how to write a NetSuite Saved Search formula to check whether the Date Created ({datecreated}) of a record is earlier than a specific date, such as July 1, 2025. The formula works independently of the user’s date format preferences.
Use Case:
You may need to filter or mark records created before a fixed date (e.g., for reporting, data cleanup, compliance reviews, or automation logic).
Solution:
Use the following formula in a Formula (Numeric) field in your Saved Search:
sql
CASE WHEN {datecreated} < TO_DATE('2025-07-01', 'YYYY-MM-DD') THEN 1 ELSE 0 END
Explanation:
{datecreated}is internally treated as aDATEtype, not text.TO_DATE('2025-07-01', 'YYYY-MM-DD')safely converts a static string to a date.- This formula returns:
1→ if the record was created before July 1, 20250→ otherwise
Why This Works Across User Preferences:
Even if a user sees the date displayed as 13-February-2024, 13/02/2024, or Feb 13, 2024, NetSuite evaluates the date logically, not textually. The formula always compares real DATE objects behind the scenes.