ANS-0180 · SAVED SEARCHES & FORMULAS
How to Display the Current Date and Time in a NetSuite Saved Search
Learn how to configure a formula field in NetSuite saved searches to accurately show the current date and time for each result.
Short answer
To display the current date and time in a NetSuite saved search, add a new 'Formula (Text)' column. In the formula field, use {now} or SYSDATE combined with the TO_CHAR function to format the output, ensuring both date and time components are visible for every result line.
Scenario
Users often need to include the exact date and time when a NetSuite saved search was executed directly within the search results. This requirement helps in tracking the timeliness of data or providing a timestamp for each record displayed. Standard fields may not always capture the precise execution time, necessitating a custom solution.
Solution
To display the current date and time a saved search is executed, navigate to the 'Results' tab of your saved search. Add a new 'Formula' field by selecting 'Formula (Text)' as the field type. In the 'Formula' text area, enter one of the following expressions to capture and format the current date and time, which will then be printed in every line of the result:
TO_CHAR({now}, 'MM/DD/YYYY HH:MI:SS AM')Alternatively, you can use SYSDATE:
TO_CHAR(SYSDATE, 'MM/DD/YYYY HH:MI:SS AM')This setup ensures that each line of the search results accurately reflects the date and time the search was run.
Expert NetSuite Support
Need help with this NetSuite issue?
Saved Searches & Formulas consulting and configuration support
