Calculate minutes in specific hour from start/end times

I have a table that shows activities by start time and end time and I’m looking to add columns that calculate how many minutes that activity overlapped with each hourly interval. So for example:

Activity Starttime Endtime *6:00
Activity Name 6:30 14:30 30
Activity Name 7:00 15:00 0
Activity Name 5:00 13:00 60

The *6:00 column is the one I’m trying to create but I can’t wrap my head around how to write it. I’ll be making more columns for each hour but once I get the first one down the rest will follow. Any insight would be appreciated.

submitted by /u/Fireteeth
[link] [comments]


Go to Source of this post
Author Of this post: /u/Fireteeth
Title Of post: Calculate minutes in specific hour from start/end times
Author Link: {authorlink}