Q:

Joining on dates which are in between two entries

I have the following two tables:
DELIVERY as t1
date,               driver_id

2016-01-01 13:44:22, 32
2016-01-02 13:14:58, 32
2016-03-05 13:14:55, 32

DELIVERY table has records when delivery pickup takes place.
and 
DRIVER_DISPATCH_HISTORY as t2
date,               driver_id, dispatch_id

2016-01-01 19:12:23, 32,        4
2016-01-07 11:16:58, 32,        3
2016-03-06 13:14:55, 32,        7
2016-03-06 16:54:12, 33,        8

DRIVER_DISPATCH_HISTORY table tracks when driver was assigned to dispatch 
My main goal is to JOIN t1.date=t2.date AND t1.driver_id=t2.driver_idto get driver_id
The problem: history table is not tracking assignments on daily basis, but rather uses intervals. If I assigned driver to dispatch one month ago, it will have only one entry. If I change dispatch for that driver today, it will add another entry as of today, also, if I change dispatch more than once, it will add multiple entries for the same day with different timestamps and I need to match delivery times in between assignments.
Question: while inner join is not a problem, I can't figure out the solution to fulfil the logic I outlined above. 
SELECT 
 t1.date, t1.driver_id, t2.dispatch_id
FROM 
 DELIVERY as t1
INNER JOIN 
 DRIVER_DISPATCH_HISTORY as t2
  ON t1.date=t2.date 
   AND 
     t1.driver_id=t2.driver_id

Assuming that driver_id and dispatch_id are matching, and there could be many deliveries

A:

try this sqlfiddle
SELECT D.date,D.driver_id,H.dispatch_id,
       H.startdate as `Dispatch_Start`,
       H.enddate as `Dispatch_End`
FROM DELIVERY D
INNER JOIN
  (SELECT H2.date as startdate,
      (SELECT MIN(date) 
       FROM DRIVER_DISPATCH_HISTORY H1
       WHERE H1.driver_id = H2.driver_id AND H1.date > H2.date
       ) as enddate,
       driver_id,
       dispatch_id
    FROM DRIVER_DISPATCH_HISTORY H2)H
ON D.driver_id = H.driver_id
AND D.date >= H.startdate
AND (D.date < H.enddate OR H.enddate IS NULL)

First you do inner selects and min(date) that's greater than the date to find enddate of the dispatch.  Then once you have table H it's easy to compare delivery's date with this H's dispatch date range.
I only got 2 rows back ...because looking at your first delivery it occurred before any dispatch has happened so it doesn't fit any date range.

After reading @Barmar's logics i think it's simpler and i wrote another variation sqlfiddle
SELECT D.date,D.driver_id,
    (SELECT dispatch_id FROM DRIVER_DISPATCH_HISTORY as H
     WHERE H.driver_id = D.driver_id AND H.Date < D.date
     ORDER BY H.date DESC LIMIT 1) as dispatch_id
FROM DELIVERY as D

