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!

Creating a business hours function

786296Jul 20 2010 — edited Jan 28 2011
I am new to oracle and I need to create a function that will take two datestamp and then tell me how many business hours are between those two dates.
Business hours are 6:00 Am to 6:00 pm Monday to Friday.

For example: if my startdate is 7/20/2010 8:00 am and end date us 7/2/2010 9:00 pm. The total work hour will be 10 hours not 13.
Another scenario:
start date: 7/20/2010 3:00 am and end time 7/20/2010 6:01 am. The total work hour is 1 min.

I am having serious difficulty with that.

Thanks
Amir
This post has been answered by Frank Kulash on Jul 21 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 25 2011
Added on Jul 20 2010
11 comments
13,679 views