Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I need some help to calculate this following example:
id | start_time1 | stop_time2 |
---|---|---|
11 | 2014-01-13 08:05:00 | 2014-01-13 12:08:00 |
12 | 2014-01-13 12:55:00 | 2014-01-13 17:00:00 |
13 | 2014-01-14 08:00:00 | 2014-01-14 16:00:00 |
14 | 2014-01-15 07:45:00 | 2014-01-15 14:40:00 |
15 | 2014-01-16 08:15:00 | 2014-01-16 13:15:00 |
16 | 2014-01-16 14:30:00 | 2014-01-16 20:30:00 |
I need to calculate the difference between stop_time2 and start_time1 when same date occurs for two different id:s. In the table there are two days with more then one id, 2014-01-13 and 2014-01-16. What I´m looking for is the time (hh:mm:ss) between id 11 and 12 (stop_time2-start_time1) and as a second post the time between id 15 and id 16.
Regards
Peter
hi
have a look at the attach example
it find the start date for each event
than for each dtae it calculates the min start and max stop
this way you handle as many event as you want
hi
have a look at the attach example
it find the start date for each event
than for each dtae it calculates the min start and max stop
this way you handle as many event as you want
Thanks Liron for a quick and correct answer!