Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to calculate the working hours?

RE: How to calculate the working hours?

From: BALA,PRAKASH (HP-USA,ex1) <prakash.bala_at_hp.com>
Date: Tue, 18 Mar 2003 09:44:47 -0800
Message-ID: <F001.0056CAFA.20030318094447@fatcity.com>


Andrea,

Will the following work?

table business_hours(
system_date date,
business_day_flag varchar2(1), -- Y/N to indicate a holiday start_hour varchar2(10),
end_hour varchar2(10)) -- If Dec 31st is a working day but half-day, this column can help you with that

This table will have an entry for every day in a year. Then go thru a loop to find the working hours.

HTH
Prakash

-----Original Message-----
Sent: Tuesday, March 18, 2003 10:49
To: Multiple recipients of list ORACLE-L

Hi,

I haven't got too many response to my working hour question, probably because I sent it out late Friday night. Let me send that question again, really appreciate your help!



We have open Time for every order, ef:

Open Time



03/12/03 11:08:07

How to calculate the working hours (8am - 5pm, no weekends) that a file remain open until now? (Sysdate - Open_Time) returns all the hours including weekend and <8am, >5pm hours. We only like to know the WORKING hours.

Thank you so much!

Andrea



Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Andrea Oracle
  INET: andreaoracle_at_yahoo.com
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: BALA,PRAKASH (HP-USA,ex1)
  INET: prakash.bala_at_hp.com
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Mar 18 2003 - 11:44:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US