no problem here.....

For all hours between 20:00 and 06:00 try this formula

=B3-A3-(INT(B3)-INT(A3))*"14:00"-MEDIAN(MOD(B3,1),"6:00","20:00")+MEDIAN(MOD(A3,1),"6:00","20:00")