Are both columns time only, or date and time formatted as time?

A bit of overkill, but see if this works correctly?

=IF(MOD(F6,1)=MOD(D6,1),"WORK","NO WORK")