Excel: Get elapsed time between two dates

As I was making a temporary time-tracking sheet I needed to get the elapsed time between two timestamps (because I’m such a lazy guy). As I’m not fluent in Excel I had to think it through and do some googling, but I came up with this solution anyways:


Expected result:


First, I created the layout as in the screenshot above. The first column is formatted as date (yyyy-mm-dd), the second, third and fourth as dates (hh:mm). The fourth column is then formated like this: =MAX(Bx:Cx)-MIN(Bx:Cx) which can be seen in the screenshot in the formula field.