Does Informix have a function equivalent to OVERLAPS, which finds out whether or not two time intervals have any time in common?

  • How are you storing these time intervals? In two columns, say StartTime and EndTime? Commented Mar 29, 2012 at 20:10
  • Exactly, two columns from two different tables with start and end dates. Commented Mar 30, 2012 at 8:05

1 Answer 1


I don't think there is a OVERLAPS() function that you could use. You'll have to stick to the usual test:

WHERE a.StartTime < b.EndTime
  AND b.StartTime < a.EndTime

Change < to <=, depending on how you want your Overlap test to function on end cases, when an end time (or date) is exactly the same as the other start time. I guess such behaviour may be wanted for dates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.