An overnight log needs a flag for the 22:00–02:00 shift. Midnight splits that window in two on a clock. Use OR so a reading can qualify on either side.
Compare whole seconds against the two limits
Put spreadsheet date-time values in column A. When the log records whole seconds, use =ROUND(MOD(A2,1)*86400,0) in B2 to get the time of day as seconds. Rounding handles tiny storage differences at the boundaries. Enter this in C2 and fill both formulas down:
=IF(A2="","",IF(OR(B2>=22*3600,B2<2*3600),"In window","Outside"))
Illustrated clock window. The solid start includes 22:00 and the open end excludes 02:00.
Try the minutes immediately around each boundary
For 21:59, 22:00, 00:30, 01:59 and 02:00, expect Outside, In window, In window, In window and Outside. Excluding 02:00 lets the next shift start then without overlap. If the 00:30 entry belongs to the previous evening in your report, calculate the shift date separately. Check the time zone of any imported timestamps before using the flag.

Illustrated validation. The clock-time flag is separate from the shift date.



