Creating a business hours function
786296Jul 20 2010 — edited Jan 28 2011I 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