Unix Technical Forum

Substracting Dates leaving out the weekends

This is a discussion on Substracting Dates leaving out the weekends within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Hi, Is there a way in Oracle 8i to substract dates like you did, but then leave out the ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 11:18 AM
Dries
 
Posts: n/a
Default Substracting Dates leaving out the weekends

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 11:18 AM
Dries
 
Posts: n/a
Default Re: Substracting Dates leaving out the weekends

Correction:
The example sould be 14/02/2007-07/02/2007
Of course

greetings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 11:18 AM
joel garry
 
Posts: n/a
Default Re: Substracting Dates leaving out the weekends

On Feb 14, 11:06 am, "Dries" <dries...@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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com