Jump to content

How to expand rows based on time comparison


Wen Wey Lee

Recommended Posts

I have the following dataset:

 

 

 

Start Timestamp

End Timestamp

Event

 

 

15/06/2020 0:00

15/06/2020 0:04

A

 

 

15/06/2020 0:07

15/06/2020 0:10

B

 

 

 

 

 

 

 

 

 

 

 

I would like to expand the rows into the following:

 

 

 

Timestamp

Event

 

 

15/06/2020 0:00

A

 

 

15/06/2020 0:01

A

 

 

15/06/2020 0:02

A

 

 

15/06/2020 0:03

A

 

 

15/06/2020 0:04

A

 

 

15/06/2020 0:05

 

 

 

15/06/2020 0:06

 

 

 

15/06/2020 0:07

B

 

 

15/06/2020 0:08

B

 

 

15/06/2020 0:09

B

 

 

15/06/2020 0:10

 

B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

It would be very much appreciated if anyone can help with this. Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...