Quantcast
Channel: Data Preparation & Blending discussions
Viewing all articles
Browse latest Browse all 4999

Help - Adding rows for reservations greater than a day

$
0
0

Hello - I'm trying to figure out what workflow to use when adding multiple rows for a reservation greater than a day. For example, this is how the record comes in (first table):

Note: I add in the "Check" column to show where the reservations start and end date are not equal. In the second table, I manually add in a row for each day. I greatly appreciate the help. 

 

Conclusion: For example, the raw data (table 1) shows one record for id 1. If I wanted to capture the duration of this reservation it would be 1 hour. Versus the cleaned data (Table 2), same record, the duration is 3 hours because I separated the reservation into 3 rows. 

 

idStartDateEndDateCheckStartTimeEndTime
11/1/20181/3/2018False8:00 AM9:00 AM
21/2/20181/3/2018False9:00 AM11:00 AM

 

Final output. Cleaned after I manually add in the rows in excel. 

idStartDateEndDateCheckStartTimeEndTime
11/1/20181/1/2018True8:00 AM9:00 AM
11/2/20181/2/2018True8:00 AM9:00 AM
11/3/20181/3/2018True8:00 AM9:00 AM
21/2/20181/2/2018True9:00 AM11:00 AM
21/3/20181/3/2018True9:00 AM11:00 AM

Viewing all articles
Browse latest Browse all 4999

Trending Articles