I need help to identify the amount of time spent on a campaign using logon and logoff times. The issue I have is that I can have several logoff times that have the same logon time. I could use the maximum logoff time by campaign but sometimes the campaign will repeat itself in the day. See example of data below.
LOGON LOGOFF CAMPAIGN
02/24/2017 8:05:04 AM 02/24/2017 8:15:04 AM CO
02/24/2017 8:05:04 AM 02/24/2017 8:25:04 AM CO
02/24/2017 8:05:04 AM 02/24/2017 8:35:04 AM CO
02/24/2017 8:05:04 AM 02/24/2017 8:45:04 AM CO
02/24/2017 8:05:04 AM 02/24/2017 8:55:04 AM CO
02/24/2017 8:05:04 AM 02/24/2017 9:00:41 AM CO
02/24/2017 9:01:22 AM 02/24/2017 9:06:45 AM PR
02/24/2017 9:01:22 AM 02/24/2017 9:26:24 AM PR
02/24/2017 9:01:22 AM 02/24/2017 9:44:24 AM PR
02/24/2017 9:01:22 AM 02/24/2017 9:48:52 AM PR
02/24/2017 9:01:22 AM 02/24/2017 10:12:53 AM PR
02/24/2017 9:01:22 AM 02/24/2017 10:22:52 AM PR
02/24/2017 10:37:46 AM 02/24/2017 10:55:12 AM PR
02/24/2017 10:37:46 AM 02/24/2017 11:00:10 AM PR
02/24/2017 10:37:46 AM 02/24/2017 11:19:54 AM PR
02/24/2017 10:37:46 AM 02/24/2017 11:46:49 AM PR
02/24/2017 10:37:46 AM 02/24/2017 11:56:49 AM PR
02/24/2017 10:37:46 AM 02/24/2017 12:06:49 PM PR
02/24/2017 10:37:46 AM 02/24/2017 12:10:20 PM PR
02/24/2017 10:37:46 AM 02/24/2017 12:29:44 PM PR
02/24/2017 1:02:26 PM 02/24/2017 1:02:50 PM EV
02/24/2017 1:50:23 PM 02/24/2017 2:00:23 PM EV
02/24/2017 1:50:23 PM 02/24/2017 2:10:23 PM EV
02/24/2017 1:50:23 PM 02/24/2017 2:14:58 PM EV
02/24/2017 2:30:26 PM 02/24/2017 2:30:43 PM EV
02/24/2017 2:30:44 PM 02/24/2017 2:31:02 PM EV
02/24/2017 2:32:47 PM 02/24/2017 2:42:47 PM EV
02/24/2017 2:32:47 PM 02/24/2017 2:52:47 PM EV
02/24/2017 2:32:47 PM 02/24/2017 3:02:47 PM EV
02/24/2017 2:32:47 PM 02/24/2017 3:12:47 PM EV
02/24/2017 2:32:47 PM 02/24/2017 3:22:47 PM EV
02/24/2017 2:32:47 PM 02/24/2017 3:28:59 PM EV
02/24/2017 3:29:57 PM 02/24/2017 3:39:57 PM CO
02/24/2017 3:29:57 PM 02/24/2017 3:49:57 PM CO
02/24/2017 3:29:57 PM 02/24/2017 3:59:57 PM CO
02/24/2017 3:29:57 PM 02/24/2017 4:00:36 PM CO
For the CO campaign, I should have 2 data lines.
LOGON LOGOFF CAMPAIGN
02/24/2017 8:05:04 AM 02/24/2017 9:00:41 AM CO
02/24/2017 3:29:57 PM 02/24/2017 4:00:36 PM CO