Hi all, apologies if this isn't the correct place to ask but I'm a first time poster.

I have a set of data of ACD events for individuals that tells me the Login Name, Event Name, the start date/time of the event, the end date/time of the event and the duration of the event. I need to be able to work out what amount of seconds of the total duration occurred in each time interval.

As an example, suppose I have Agent 1 who went into a particular ACD state at 09:35 and came out of it at 10:05. I need to create something that would create an output similar to:


Name Event Bucket Duration (seconds)
Agent 1 Outbound 09:30 600
Agent 1 Outbound 09:45 900
Agent 1 Outbound 10:00 300


In this example 1 line of input would produce 3 lines of output

I appreciate this is potentially a big ask but any contributions would be gratefully received. I should say my experience of programming is minimal at best