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

Home -> Community -> Usenet -> c.d.o.misc -> Re: elapsed time between 2 dates

Re: elapsed time between 2 dates

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1998/01/27
Message-ID: <885921408.22740998@dejanews.com>#1/1

In article <01bd2aae$abcd8190$863612ac_at_pw48>,   "Laura Bellini" <laura.bellini_at_compaq.com]> wrote:
>
> I was wondering if anyone out there happens to have a function that they've
> created that evaluates the elapsed time between two dates. The function I
> need to create involves taking into considering my company's business days,
> holidays, and hours, but I thought if I had a basic function to work with,
> I might be able to get a good start.
>
> I need to consider the company's business hours and holidays -- there is a
> 'holiday' table and a day table that establish working days for the
> company. By checking the inital (incoming) date against these tables, I
> would need to determine if the incoming day is a valid working day - if
> not, find the next valid working day.
>
> The incoming parameters would be a start date and an end date.
>
> Thanks in advance.
>
> Laura Bellini
> laura.bellini_at_compaq.com

That's easy since you have a table containing the business days... just select count(*) to get the number of work days.

I have developed and posted a routine that counts the days between two dates excluding Saturdays and Sundays. You might find it in www.dejanews.com (or I can send it if necessary.)

To get hours, you divide the difference between two dates by 24, and divide by 1440 for minutes. I believe Thomas Kyte has posted examples of those calculations. Again I suggest you search Deja News.

Regards,
Steve Cosner



http://members.aol.com/stevec5088
Downloadable Quick Access utility form: Display and update any table.
-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Tue Jan 27 1998 - 00:00:00 CST

Original text of this message

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