@Vivy1 To better understand the problem and desired outcome which rows from below sample data would you want to select? And why (selection criteria)?
data example;
input dt1:date9. dt2:date9.;
m1 = intck('month',dt1,dt2);
m2 = intck('month',dt1,dt2,'C');
y1 = intck('year',dt1,dt2);
y2 = intck('year',dt1,dt2,'C');
format dt1 dt2 date9.;
datalines;
29OCT2019 18Nov2020
29OCT2019 28OCT2020
29OCT2019 29OCT2020
29OCT2019 30OCT2020
29OCT2019 01NOV2020
28FEB2019 27FEB2020
28FEB2019 28FEB2020
28FEB2019 29FEB2020
28FEB2019 01MAR2020
29FEB2020 27FEB2021
29FEB2020 28FEB2021
29FEB2020 01MAR2020
28FEB2020 27FEB2021
28FEB2020 28FEB2021
28FEB2020 01MAR2020
;
run;
proc print data=example;
run;
... View more