The overlap seems to be (if I am understanding you properly) when d2start_dt < d1End_dt (although it would be nice if you had stated that directly to eliminate my possible misunderstanding). If that's the case, then the relatively simple test of d1End_dt - d2start_dt >=28 results in a flag.
if d1End_dt - d2start_dt >= 28 then flag=1;
else flag=0;
This assumes that all of your dates are valid SAS dates, and not character strings.
--
Paige Miller