|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Getting a true time spent
Hey all,
This may be a little bit hard to explain, but here goes. I have a table full of time periods, similar to the following: ID Start End ---------------------- 1 10:00 10:15 2 10:10 11:30 3 11:00 12:15 If I were to get the total time period for this data it would be 2hr 50 mins. However I am looking for a method to get the "true" time spent, which would be 2hr 15 mins. Basically, I dont want to count the time twice when they overlap. Does anyone have any ideas? |
|
#2
|
|||
|
|||
|
I should also note that there might be gaps in the times, as follows:
ID Start End ----------------------- 1 7:00 7:15 2 7:25 7:40 3 7:30 8:00 So it is not simply a case of subtracting the MIN() time from the MAX() time. |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Getting a true time spent |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|