I would like to write a routine which will allow me to take dated events (records) in a table which span accross a set time frame and in the cases where no event took place
With no details about your specifics (table schema, available language options etc), iI guess that you just need the algorithm to pick up. So here's a quick algorithm with no safeguards.
properdata = "select * from data where eventHasTakenPlace=true";
wrongdata = "select * from data where eventHasTakenPlace=false";
for each wrongRecord in wrongdata {
exampleRecord = select a.value1, a.value2,...,a.date from properdata as a
inner join
(select id,max(date)
from properdata
group by id
having date