MySQL 判斷兩個時間區間是否重疊 Determine Whether Two Date Ranges Overlap

判斷兩個時間區間是否重疊

<?php

/* 判斷兩個時間區間是否重疊 */
/* that it is sufficient to say that the two ranges overlap */
WHERE (StartDate1 <= EndDate2) AND (StartDate2 <= EndDate1)

?>


http://stackoverflow.com/questions/325933/determine-whether-two-date-ranges-overlap[……]

閱讀更多