Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > Re: How to calc...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 6868 of 7280
Post > Topic >>

Re: How to calculate time difference excluding weekends (saturday and

by Charles Hooper <hooperc2000@[EMAIL PROTECTED] > Apr 30, 2008 at 07:29 AM

On Apr 30, 9:49=A0am, deepakp <deepak10...@[EMAIL PROTECTED]
> wrote:
> I have an Oracle table that has 2 Date fields..i.e. the data type -
> DATE
>
> Field 1: =A0START_DATE sample value =A0"2008-04-04 12:00:00";
> Field 2: =A0END_DATE =A0sample value =A0"2008-04-07 05:46:07";
>
> If I subtract one date from another, I can get the time difference.
>
> Round((END_DATE - START_DATE), 4) AS TOTAL_DAYS
>
> The above results in 3.7404
>
> Between 2008-04-04 and 2008-04-07, there is Saturday and Sunday which
> are 2008-04-05 and 2008-04-06.
> I would like them to be excluded.
>
> Hence, the resultant that I'm looking for should be 1.7404 =A0-- not
> 3.7404
>
> Is there a simple way to get the desired solution?
>
> Thanks,
> Deepak

Have you tried a Google search of the Usenet archives, or even a
regular Google search?
http://groups.google.com/group/comp.databases.oracle.misc/browse_thread/thre=
ad/5a8545a4f3698ee0
http://groups.google.com/group/comp.databases.oracle.misc/browse_thread/thre=
ad/cad8621182ae7d1b
http://www.google.com/search?hl=3Den&q=3Dsite%3Aasktom.oracle.com+weekends+b=
usiness+days

Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc.
 




 5 Posts in Topic:
How to calculate time difference excluding weekends (saturday an
deepakp <deepak10000@[  2008-04-30 06:49:28 
Re: How to calculate time difference excluding weekends (saturda
Charles Hooper <hooper  2008-04-30 07:29:31 
Re: How to calculate time difference excluding weekends (saturda
deepakp <deepak10000@[  2008-04-30 09:45:23 
Re: How to calculate time difference excluding weekends (saturda
Ken Denny <ken@[EMAIL   2008-04-30 12:21:12 
Re: How to calculate time difference excluding weekends (saturda
deepakp <deepak10000@[  2008-05-01 13:26:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 0:23:33 CST 2008.