Get data excluding time intervals in another table
This is a classic anti-join scenario. You want rows from one table excluding those matching another table.

In English, you could put the condition like this:


  Select every row from Message for which there is no matching row in BlockUser.


In SQL, one way of expressing the above is like this:

SELECT
  *
FROM
  dbo.Message AS m
WHERE
  NOT EXISTS
  (
    SELECT
      *
    FROM
      dbo.BlockUser AS bu
    WHERE
      m.DateCreated &gt;= bu.BlockStartDate
      AND m.DateCreated &lt; bu.BlockEndDate
  )
;