Function to check for DateTime conflicts

I need to write a function that will accept 4 DateTime parameters (StartDate1, EndDate1, StartDate2, EndDate2) and will return a boolean indicating if the date ranges intersect (i.e. if StartDate 2 - EndDate 2 intersect with StartDate1 - EndDate1).

Thanks in advance,
Who is Participating?
softplusConnect With a Mentor Commented:
       If ((date1end > date2start) &&  (date1start < date2end)) return(true); else return(false);
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.