Есть список, в котором отображается ID пользователя и время подключения и отключения.
Каким образом можно рассчитать продолжительность подключения (время, которое пользователь находился в сети)?
Список:Connect: 8404227212(333);2020-08-31 13:56:26
Connect: 7996445703(1186);2020-08-31 13:57:15
Connect: 8122986870(1278);2020-08-31 14:23:07
Connect: 8034198597(1272);2020-08-31 14:29:57
Connect: 8399115698(698);2020-08-31 14:33:51
Connect: 8062130663(1045);2020-08-31 14:35:38
Connect: 8968409982(273);2020-08-31 14:38:03
Connect: 8325141528(690);2020-08-31 14:42:55
Connect: 9025739075(840);2020-08-31 14:43:57
Disconect: 9025739075(840);2020-08-31 14:49:13
Connect: 8070993160(805);2020-08-31 14:50:57
Connect: 8397137873(287);2020-08-31 14:52:07
Connect: 8984422398(899);2020-08-31 14:55:22
Disconect: 8984422398(899);2020-08-31 14:57:05
Connect: 8984422398(899);2020-08-31 14:59:06
Connect: 8332798146(123);2020-08-31 15:00:34
Disconect: 8332798146(123);2020-08-31 15:05:02
Connect: 8332798146(123);2020-08-31 15:05:52
Connect: 9025739075(840);2020-08-31 15:06:25
Connect: 8412067446(1326);2020-08-31 15:08:34
Disconect: 9025739075(840);2020-08-31 15:09:49
Connect: 8166871856(1309);2020-08-31 15:10:19
Disconect: 8062130663(1045);2020-08-31 15:11:52
Disconect: 8325141528(690);2020-08-31 15:14:32
Connect: 8325141528(690);2020-08-31 15:15:47
Connect: 8149684963(1358);2020-08-31 15:16:26
Connect: 8136294602(1359);2020-08-31 15:16:59
Disconect: 8412067446(1326);2020-08-31 15:17:38
Connect: 8196881737(1330);2020-08-31 15:18:06
Connect: 8412067446(1326);2020-08-31 15:19:00
Connect: 8089884942(1047);2020-08-31 15:19:17
Connect: 8254864541(938);2020-08-31 15:19:51
Connect: 8109710776(1320);2020-08-31 15:20:18
Connect: 8042918099(274);2020-08-31 15:24:30
Connect: 8248601702(1351);2020-08-31 15:25:32
Disconect: 8248601702(1351);2020-08-31 15:26:33
Connect: 8248601702(1351);2020-08-31 15:29:22
Disconect: 8042918099(274);2020-08-31 15:29:26
Connect: 8042918099(274);2020-08-31 15:29:33
Disconect: 8248601702(1351);2020-08-31 15:31:39
Disconect: 8412067446(1326);2020-08-31 15:34:34
Connect: 8412067446(1326);2020-08-31 15:36:43
Connect: 8830620814(1193);2020-08-31 15:38:11
Disconect: 8399115698(698);2020-08-31 15:38:37
Connect: 8248601702(1351);2020-08-31 15:41:00
Disconect: 8248601702(1351);2020-08-31 15:42:00
Connect: 9085485727(1360);2020-08-31 15:48:05
Disconect: 8332798146(123);2020-08-31 15:49:01
Disconect: 8070993160(805);2020-08-31 15:50:11
Disconect: 9085485727(1360);2020-08-31 15:57:00
Connect: 8104558076(1153);2020-08-31 16:00:01
Connect: 8248601702(1351);2020-08-31 16:04:33
Disconect: 8136294602(1359);2020-08-31 16:09:21
Connect: 8875069662(332);2020-08-31 16:13:38
Connect: 8089042528(530);2020-08-31 16:15:00
Connect: 8021093588(283);2020-08-31 16:18:15
Connect: 7980753534(1180);2020-08-31 16:19:09
Connect: 8191691863(1361);2020-08-31 16:21:26
Connect: 8186392731(507);2020-08-31 16:23:40
Disconect: 8968409982(273);2020-08-31 16:31:13
Disconect: 8109710776(1320);2020-08-31 16:31:35
Connect: 8098423387(935);2020-08-31 16:31:58
Disconect: 8325141528(690);2020-08-31 16:32:09
Connect: 8394194178(1027);2020-08-31 16:32:31
Connect: 8070993160(805);2020-08-31 16:34:08
Disconect: 8191691863(1361);2020-08-31 16:36:40
Connect: 8968409982(273);2020-08-31 16:40:31
Connect: 8109710776(1320);2020-08-31 16:40:47
Disconect: 8166871856(1309);2020-08-31 16:41:29
Disconect: 8394194178(1027);2020-08-31 16:41:53
Connect: 8166871856(1309);2020-08-31 16:42:19
Connect: 8394194178(1027);2020-08-31 16:42:48
Disconect: 7980753534(1180);2020-08-31 16:43:59
Connect: 7980753534(1180);2020-08-31 16:44:09
Disconect: 7980753534(1180);2020-08-31 16:45:12
Connect: 7980753534(1180);2020-08-31 16:45:21
Connect: 8128380503(873);2020-08-31 16:45:37
Disconect: 7980753534(1180);2020-08-31 16:46:12
Disconect: 8128380503(873);2020-08-31 16:46:12
Connect: 7980753534(1180);2020-08-31 16:46:20
Disconect: 7980753534(1180);2020-08-31 16:47:08
Connect: 7980753534(1180);2020-08-31 16:47:17
Connect: 8407502394(1042);2020-08-31 16:52:03
Disconect: 8875069662(332);2020-08-31 17:01:40
Disconect: 8412067446(1326);2020-08-31 17:02:22
Connect: 8412067446(1326);2020-08-31 17:03:20
Connect: 8871551691(1280);2020-08-31 17:11:57
Connect: 8277519651(1304);2020-08-31 17:14:23
Disconect: 8968409982(273);2020-08-31 17:18:33
Disconect: 8089042528(530);2020-08-31 17:33:50
Connect: 8294173616(574);2020-08-31 17:34:48
Disconect: 8830620814(1193);2020-08-31 17:36:07
Disconect: 7996445703(1186);2020-08-31 17:38:12
Disconect: 8070993160(805);2020-08-31 17:39:33
Connect: 8070993160(805);2020-08-31 17:39:45
Disconect: 8394194178(1027);2020-08-31 17:40:13
Connect: 7996445703(1186);2020-08-31 17:43:13
Disconect: 8294173616(574);2020-08-31 17:46:44
Connect: 8433138439(14);2020-08-31 17:47:25
Connect: 8927353550(72);2020-08-31 17:49:14
Disconect: 8070993160(805);2020-08-31 17:51:02
Connect: 8178581433(606);2020-08-31 17:51:27
Connect: 8294173616(574);2020-08-31 17:51:52
Disconect: 8984422398(899);2020-08-31 17:54:09
Connect: 8040136482(1209);2020-08-31 17:55:31
Connect: 8332798146(123);2020-08-31 18:00:21
Disconect: 7996445703(1186);2020-08-31 18:12:47
Connect: 8847206620(966);2020-08-31 18:17:11
Disconect: 8186392731(507);2020-08-31 18:17:46
Connect: 8119883895(952);2020-08-31 18:18:21
Connect: 8984422398(899);2020-08-31 18:19:27
Disconect: 8412067446(1326);2020-08-31 18:20:31
Connect: 8412067446(1326);2020-08-31 18:21:50
Disconect: 8332798146(123);2020-08-31 18:23:18
Connect: 8332798146(123);2020-08-31 18:24:49
Disconect: 8098423387(935);2020-08-31 18:30:30
Disconect: 8404227212(333);2020-08-31 18:32:18
Connect: 8022112908(1179);2020-08-31 18:34:20
Connect: 8404227212(333);2020-08-31 13:56:26
Disconect: 8404227212(333);2020-08-31 18:32:18
Вывод:
8404227212(333) 4:35:52
...(и т.д.)