Take a look at your code:
DateTime d1 = new DateTime(2019,05,26,21,43,24);
DateTime d2 = new DateTime(2019, 05, 26, 5, 32, 42);
d1
is bigger than
d2
, so... this condition:
ShiftStartDateTime>=d1 AND ShiftStartDateTime <=d2
will never get true!
Try this:
DataRow[] rows = table.Select(string.Format("ShiftStartDateTime>=#{0}# AND ShiftEndDateTime<=#{1}#", d2, d1));