Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Calculate cross duration for date times

$
0
0

Hello,

I have a table "experience" which contains start and end data for each experience for each job seekers.

I need to know the total cross duration of experience for any job seekers.

For example, check the following table

---------------------------

JobSeekerId  -  Company  -  StartDate  -  EndDate

4                 - company1  -  Jan 2010  -  Jun 2010

4                 - company2  -  Feb 2010  -  Dec 2010

----------------------------

Here the total number of experience for job seeker "4" should be12 month which is the cross join duration, not 17 Months which is the total of the 2 duration.

Thanks and Best regards




Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>