Discussions

Check out Oracle NetSuite upcoming events and conferences here
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Update your Profile with your Support type to get your Support Type badge.
Community Poll: What sort of content would you like to see more of?

NSC | Mastering Date Arithmetic in SQL using NetSuite2.com data source

Performing arithmetic operations on dates in SQL is straightforward. To add or subtract a specific number of days from a date value, you simply use the addition (+) or subtraction (-) operators, followed by the desired number of days. Let's illustrate this with an example query:

SELECT sysdate + 1 AS "Date +1" FROM task WHERE ID = '1076';
SELECT sysdate - 1 AS "Date -1" FROM task WHERE ID = '1076';

In the above queries:

  • sysdate represents the current date in NetSuite.
  • task is the table containing the relevant data.
  • ID = '1076' specifies a condition, ensuring that the operation is applied to the task with the given ID.

Richard James Uri | SuiteCloud and WMS Tech

----

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!

Leaderboard

Community Whiz

Quarter 2 ((Apr-Jun 2024) )

This Week's Leaders

This Month's Leaders

All Time Leaders