x Status
14/09/2017 15:30:31 A
14/09/2017 15:30:34 A
14/09/2017 16:40:25 B
14/09/2017 17:00:25 B
15/09/2017 09:00:20 A
15/09/2017 10:00:20 A
What I want is to group it by Status and find the difference between date times on each group also the cumsum of time. The desired out put would be
x Status diff.time
14/09/2017 15:30:31 A
14/09/2017 15:30:34 A 3 mins
14/09/2017 16:40:25 B
14/09/2017 17:00:25 B 20 mins
15/09/2017 09:00:20 A
15/09/2017 10:00:20 A 60 mins