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 Time Arithmetic in SQL using NetSuite2.com data source

edited Apr 9, 2024 7:27PM in SuiteCloud / Customization

Performing time arithmetic in SQL involves adding or subtracting a fraction of a day to a given date or timestamp. The logic is simple: to add a certain amount of time, you add a fraction of a day, and to subtract time, you subtract the corresponding fraction.

For instance, suppose you want to add or subtract 60 minutes from a given date. Since there are 1440 minutes in a day (24 hours * 60 minutes), you would add or subtract 60/1440 (or 1/24) of a day.

Here's a breakdown of the process:

To add time: You add the fraction of a day to the date.

To subtract time: You subtract the fraction of a day from the date.

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