Re: workday function

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Gary Stainburn" <gary(dot)stainburn(at)ringways(dot)co(dot)uk>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: workday function
Date: 2007-05-15 12:03:01
Message-ID: 162867790705150503u5bed45c7w9d77cc186ac29e2e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello

You can use functions from Orafce package
http://www.pgsql.cz/index.php/Oracle_functionality_%28en%29#PLVdate

sample:

SELECT plvdate.plvdate.default_holydays('czech');
SELECT plvdate.add_bizdays(CURRENT_DATE, 10);
SELECT plvdate.isbizday('2006-12-25');

Regards
Pavel Stehule

2007/5/15, Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk>:
> Hi folks
>
> I need to be able to add and subtract workdays, something like
>
> select CURRENT_DATE - '3 work days'::interval;
>
> I can't see how to do this natively so I'm looking to write a function to do
> it and was wondering if anyone's already done it.
>
> While Googling I've found that MS Excel has a workday function which seems to
> do what I want.
>
> Any help would be appreciated.
> --
> Gary Stainburn
>
> This email does not contain private or confidential material as it
> may be snooped on by interested government parties for unknown
> and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Paul251 2007-05-15 13:17:26 SQL Query Validate Records Multiple Tables - Help Needed
Previous Message ashok@kalculate.com 2007-05-15 11:40:25 Serial number of a record