I got the duration simply by subtracting C1 and B1
I suppose you men subtracting A1 from B1 ?
Perhaps try
Formula: copy to clipboard
=MOD(C1,24)
in D1