Intersection of two date interval - Mailing list pgsql-sql

From Suha Onay
Subject Intersection of two date interval
Date
Msg-id 49a67b230701260139n1153ee82x8ae91875118f3cd2@mail.gmail.com
Whole thread Raw
Responses Re: Intersection of two date interval  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-sql
Hi,<br /><br />How can i find the number of days in the intersection of 2 date interval?<br />For example: <br />1st 
interval:(10.01.2007, 20.01.2007)<br />2nd interval: (13.01.2007, 21.01.2007)<br />The intersection dates are:
13,14,15,16,17,18,19,20 <br />The result is: 8<br /><br />How can i find the result, 8 in an sql query without using
CASEstatements?<br /><br />Table columns are id PK, date1 date, date2 date.<br /><br />Thanks for all your help.<br
/><brclear="all" /><br />Suha<br /><br /><br /> 

pgsql-sql by date:

Previous
From: "codeWarrior"
Date:
Subject: Re: LEFT Join Question
Next
From: "A. Kretschmer"
Date:
Subject: Re: Intersection of two date interval