Skip to Main Content

SQL & PL/SQL

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!

Business Hours and no weekend

SueBrown1Sep 23 2016 — edited Sep 23 2016

Hello,

this is my first post, so if it is incorrect let me know

im not the DBA so, I cant create a function.

I need to calculate business hours M-F 7a - 6p and no weekends.

  • when a case is received until its closed
  • and when the status is"on Hold" subtract the On hold ti

Select (extract(day from (CloseNDATE - RECDDATE)*1)*1440 + extract(Hour from (CloseNDATE - RECDDATE))*60 +  extract(Minute from (CloseNDATE - RECDDATE)) ) RcddDetdMinutes

from table

This only returns the straight time. how do I add the business hours and subtract the weekends

  • a case can be open on the weekends, so if it is closed and open on the weekend that is ok.
  • if a case is open on the weekends and not closed til normal business hours it shouldn't count the weekend time

thanks




Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2016
Added on Sep 23 2016
3 comments
927 views