I have a data table with 3 columns, (Start, Stop, & Type). Some of the original datetimes hand off from Stop to Start smoothely, but others have gaps. I want to create new rows with a Start datetime, End datetime, & Type = 0 that fills the gaps if needed. Below is some sample data...
What I have...
LOG_START_DT LOG_END_DT Type
3/28/2018 9:30 3/28/2018 12:15 2
3/28/2018 13:30 3/28/2018 16:30 1
3/28/2018 17:15 3/28/2018 20:00 2
3/28/2018 21:15 3/29/2018 0:00 2
3/29/2018 0:00 3/29/2018 0:30 2
3/29/2018 1:30 3/29/2018 5:00 1
What I want...
LOG_START_DT LOG_END_DT Type
3/28/2018 9:30 3/28/2018 12:15 2
3/28/2018 12:16 3/28/2018 13:29 0
3/28/2018 13:30 3/28/2018 16:30 1
3/28/2018 16:31 3/28/2018 17:14 0
3/28/2018 17:15 3/28/2018 20:00 2
3/28/2018 20:01 3/28/2018 21:14 0
3/28/2018 21:15 3/29/2018 0:00 2
3/29/2018 0:00 3/29/2018 0:30 2
3/29/2018 0:31 3/29/2018 1:29 0
3/29/2018 1:30 3/29/2018 5:00 1
Also, it's important to note that whatever rows are added do not have a time that overlaps with the previous end or next start date time. My original data is about 500 rows too which I've tried to do a combination for loops or if statements, but can't figure it out or it takes way too long to run through the data.
Thank you!