check if two date ranges overlap sql server

Solutions on MaxInterview for check if two date ranges overlap sql server by the best coders in the world

showing results for - "check if two date ranges overlap sql server"
Filippo
11 Sep 2017
1public function check_time_overlap($start_time1, $end_time1, $start_time2, $end_time2) {
2	return (($start_time1) <=  ($end_time2) && ($start_time2) < ($end_time1) ? true : false);
3}
4
5// true: overlap
6// falseL not overlap
Liam
12 Feb 2016
1if((StartDate1 <= EndDate2) && (StartDate2 <= EndDate1)) {
2  	//overlapping dates
3}
Fleur
27 Feb 2019
1(StartDate1 <= EndDate2) and (StartDate2 <= EndDate1)
2
similar questions