Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Calculate time in minutes between two dates

$
0
0

Hello All, 

     I have data that shows the when a rep enters a mall (In) and leaves a mall (Out) I would like to be able to calculate how long the rep spends within a mall in minutes. 

 

The data looks like this 

RepLocationStatusDate Time
Rep 1Massey MallIn2016/11/1 8:20
Rep 2Crown MallIn2016/11/1 8:30
Rep 3Pacific MallIn2016/11/1 8:40
Rep 2Crown MallOut 2016/11/1 10:20
Rep 1Massey MallOut 2016/11/1 11:00
Rep 3Pacific MallOut 2016/11/1 12:00
Rep 2Crown MallIn2016/11/2 8:00
Rep 1Massey MallIn2016/11/2 8:20
Rep 3Pacific MallIn2016/11/2 9:30
Rep 1Massey MallOut2016/11/2 10:00
Rep 3Pacific MallOut2016/11/2 10:00
Rep 2Crown MallOut2016/11/2 12:00

 

The output I am after is something like this on the out status

 

RepLocationStatusDate TimeTime Spent In Mall (Minutes)
Rep 1Massey MallIn2016/11/1 8:20 
Rep 2Crown MallIn2016/11/1 8:30 
Rep 3Pacific MallIn2016/11/1 8:40 
Rep 2Crown MallOut 2016/11/1 10:20110
Rep 1Massey MallOut 2016/11/1 11:00160
Rep 3Pacific MallOut 2016/11/1 12:00200
Rep 2Crown MallIn2016/11/2 8:00 
Rep 1Massey MallIn2016/11/2 8:20 
Rep 3Pacific MallIn2016/11/2 9:30 
Rep 1Massey MallOut2016/11/2 10:00100
Rep 3Pacific MallOut2016/11/2 10:0030
Rep 2Crown MallOut2016/11/2 12:00240

 

I am not sure if a calculated column is the best solution and have no idea where to start. Any help would be appreciated. 

Thank you,
Adam


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>