问题是这样:
The dataset below contains enrollment records for students. Write code to count the numberof days each student was enrolled. Include both the start date and the end datein the count. Beware of overlapping date ranges. As an example student 1’s count should be 6.
data Enrollment;
informatStart_Date MMDDYY10.End_Date MMDDYY10.;
formatStart_Date MMDDYY10.End_Date MMDDYY10.;
infiledatalines dlm=',';
inputStudent_Id Start_Date End_Date;
datalines;
1,8/20/2012,8/23/2012
1,8/21/2012,8/25/2012
2,8/20/2012,8/22/2012
2,8/24/2012,8/25/2012
3,8/20/2012,8/23/2012
4,8/22/2012,8/23/2012
3,8/22/2012,8/23/2012
4,8/23/2012,8/24/2012
3,8/24/2012,8/24/2012
run;
因为时间段有overlap,所以不知道如何进行计算?向各位大牛请教一下!