我有一部分日常运行数据如下:
15/09/2015 00:00:00 STOP
15/09/2015 00:15:00 START
15/09/2015 00:30:00 START
15/09/2015 00:45:00 START
15/09/2015 01:00:00 START
15/09/2015 01:15:00 START
15/09/2015 01:30:00 START
15/09/2015 01:45:00 START
15/09/2015 02:00:00 START
15/09/2015 02:15:00 STOP
15/09/2015 02:30:00 STOP
15/09/2015 02:45:00 START
15/09/2015 03:00:00 START
15/09/2015 03:15:00 START
15/09/2015 03:30:00 START
15/09/2015 03:45:00 START
15/09/2015 04:00:00 START
15/09/2015 04:15:00 START
15/09/2015 04:30:00 STOP
循环将在STOP模式之间定义,因此 cycle_one需要1小时45分钟,如下所示。
我现在一直在做的是使用IF函数我可以得到时间差,然后我使用SUM函数的最后一列。然后我手动将每个块模式识别为cycle1,cycle2 ..
15/09/2015 00:00:00 STOP 00:00:00 0
15/09/2015 00:15:00 START 00:00:00 00:00:00
15/09/2015 00:30:00 START 00:15:00 00:15:00
15/09/2015 00:45:00 START 00:15:00 00:30:00
15/09/2015 01:00:00 START 00:15:00 00:45:00
15/09/2015 01:15:00 START 00:15:00 01:00:00
15/09/2015 01:30:00 START 00:15:00 01:15:00
15/09/2015 01:45:00 START 00:15:00 01:30:00
15/09/2015 02:00:00 START 00:15:00 01:45:00
15/09/2015 02:15:00 STOP 00:00:00 0
15/09/2015 02:30:00 STOP 00:00:00 0
15/09/2015 02:45:00 START 00:00:00 00:00:00
15/09/2015 03:00:00 START 00:15:00 00:15:00
15/09/2015 03:15:00 START 00:15:00 00:30:00
15/09/2015 03:30:00 START 00:15:00 00:45:00
15/09/2015 03:45:00 START 00:15:00 01:00:00
15/09/2015 04:00:00 START 00:15:00 01:15:00
15/09/2015 04:15:00 START 00:15:00 01:30:00
15/09/2015 04:30:00 STOP 00:00:00 0
是否有可能在STOP模式之间实际过滤数据,以便更容易求和并按块定义循环?