Overview
SYSDATE returns the current date and time set in the system.
In simple terms, the SYSDATE function in NetSuite's Saved Search SQL is like a helpful assistant that always has the answer to the question, "What's the current date and time?" It provides this information instantly whenever you use it in your saved searches.
Think of it as a digital clock and calendar combined, ready to give you the exact date and time with just a simple command. When you use SYSDATE, you're essentially saying, "Hey, give me the current date and time!"
Understanding the Syntax
The Syntax is simple:
No parenthesis or curly braces needed.
SYSDATE, {today} & {now}
The cool part is, SYSDATE is like an alias for the terms '{today}' and '{now}' in NetSuite's Saved Searches. So, whether you use SYSDATE, {today}, or {now}, they all mean the same thing and will give you the current date and time. This makes it super convenient for users as they can choose the syntax they find most intuitive.
However, an important aspect to note is that SYSDATE takes into account the time zone set in your account's General Preferences. This means the date and time it returns are aligned with your company's time zone.
On the other hand, when you use {today} or {now}, these are based on the time zone set in the User Preferences. So, if you have team members in different time zones, they might see slightly different results when using these functions, reflecting their local times.
For example:
An Accounts Receivable Specialist manages hundreds of invoices daily and is dedicated to ensuring their company's financial health. They want to have a search that can easily show how many days each invoice is past its due date. This information is crucial for follow-up calls and emails with clients.
Formula: ROUND(SYSDATE-{duedate})
This formula calculates the number of days between the current date and the due date, rounding it to the nearest whole number.
While this formula seems basic, it can be combined with other functions like a CASE statement or even use it in the Highlighting tab of the search to make it more visual and help the users with prioritization strategies.
-----
If you find this information useful, let us know by reacting or commenting on this post!