Duration (end time-start time)

Duration (end time-start time)

In col A I have start time. Col B is end time. In col D I need duration which in Google sheets it is as easy as =B1-A1, but that doesn't work here. How do I go about it?

All the best, Th