Re: Help needed: Working with dates and business days (non-weekends)

From: Radhakrishnan Narayanswamy <nrk_at_efn.org>
Date: 1995/08/30
Message-ID: <Pine.SUN.3.91.950830142405.10155A-100000_at_garcia.efn.org>#1/1


Hi!

This looks like a common problem, based on my experience.

In one of my previous projects, we managed to get ride of this problem by creating and maintaining a separate table eg. CALENDAR, by populating records periodically into it. say, for every 2 years. The details in the record may include the date and it is a working day or a non-working day. By using this table, you can even have a list of national holidays and so on.

If its going to be a one-time calculation (or not very frequent usage of this logic), You can write a function in PL/SQL , pro*C etc. by performing a loop to check if each day falls bet. monday and friday

Hope this helps u

Regards

NRK On 23 Aug 1995, leon.kovacic wrote:

> I need to be able to calculate:
>
> 1) date2 = date1 + num_business_days
>
> OR
>
> 2) num_business_days_between = date3 - date4
>
> where business days are non-weekend days of the week
> (Monday to Friday).
>
> I just thought that this must be a common thing to do,
> but there seems to be no ORACLE function to manipulate
> dates and business days.
>
> Thanks in advance.
>
> Alister Miller (Using Leon's account).
>
>
>
>
  Received on Wed Aug 30 1995 - 00:00:00 CEST

Original text of this message