Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Allow Round/Ceil/Floor style operations on Intervals

John_KOct 2 2017

Taken from my post here ( ) I think this would make the syntax a lot clearer.

  1. select extract (hour from numtodsinterval (8.333, 'HOUR')) hours, 
  2.        extract (minute from numtodsinterval (8.333, 'HOUR')) mins, 
  3.        numtodsinterval (8.333, 'HOUR') intv 
  4.   from dual; 

Allow something like:

round(myinterval,'Minute')

so we can round (or ceil/floor) intervals the specified level.

Comments
Post Details
Added on Oct 2 2017
3 comments
202 views