Hi all! My dataset currently has 1 field for "Date Time" and another with activity. I'm trying to split the date time field into (1) date and (2) time and then consolidate the records into one record so I can calculate the duration per event (event being open to close timeframe).
Current data structure:
Record # | Date Time | Location ID | Activity |
1 | 2022-01-03 17:33:07 | 1001 | Open |
2 | 2022-01-03 18:52:55 | 1001 | Close |
3 | 2022-01-05 06:38:23 | 1002 | Open |
4 | 2002-01-05 07:15:05 | 1002 | Close |
Trying to get to this:
Prior Records | Date | Location | Open Time | Close Time | Duration |
1 & 2 | 1/3/2022 | 1001 | 17:33:07 | 18:52:55 | 01:19:48 |
3 & 4 | 1/5/2022 | 1002 | 06:38:23 | 07:15:05 | 00:36:42 |
Does anyone know how to do this? Thanks in advance!!
Solved! Go to Solution.