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: Substracting Dates leaving out the weekends

Re: Substracting Dates leaving out the weekends

From: joel garry <joel-garry_at_home.com>
Date: 14 Feb 2007 15:47:24 -0800
Message-ID: <1171496844.811127.173950@m58g2000cwm.googlegroups.com>


On Feb 14, 11:06 am, "Dries" <dries..._at_gmail.com> wrote:
> Hi,
>
> Is there a way in Oracle 8i to substract dates like you did, but then
> leave out the weekend-days. So if i substract two days like
> 14/02/2007-07/02/2004 normally I would get the result of 7days. The
> result I need is 5Days (Saturday and sunday left out).
>
> Thank you very much in advance.
>
> Greetings
>
> Dries Cox

A quick google gives http://book.itzero.com/read/others/0602/ OReilly.SQL.Cookbook.Dec.2005_html/0596009763/sqlckbk-CHP-8- SECT-3.html

Basically, count the number of days, excluding those that translate to saturday or sunday.

jg

--
@home.com is bogus.
http://www.gridtoday.com/grid/1266347.html
Received on Wed Feb 14 2007 - 17:47:24 CST

Original text of this message

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