Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Substracting Dates leaving out the weekends
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.htmlReceived on Wed Feb 14 2007 - 17:47:24 CST