Find Intersection of Two Date Ranges
Say you have a database of events that span multiple days and you want to filter all events between a certain date range. At first I had this giant mess of this AND that OR this AND that... until I found this:
NOT (range1_start > range2_end OR range1_end < range2_start)That freakin' rules.
Trackbacks
Use the following link to trackback from your own site:
http://www.juju.org/articles/trackback/917
Comments
Leave a response, Track co.mments
Juju