• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

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,
Larkin
0
larkinyoung
Asked:
larkinyoung
1 Solution
 
softplusCommented:
       If ((date1end > date2start) &&  (date1start < date2end)) return(true); else return(false);
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now