Dear,
I need to get the complete aedate from the partial available aedate.
If year is same and month is greater than trtdate then add 01 as day to aedate
If year is same and month is less than trtdate then add 15 as day to aedate
If year is and month is same than aedate=trtdate
if year is greater than year of trtdate then add 01 as day to aedate
Please help. Thank you
output needed;
id aedate trtdate
1 2016-11-01 09JUL2016
2 2016-06-15 17JUL2016
3 2016-07-17 17JUL2016
4 2017-01 -01 25NOV2016
;
data one;
input id aedate $ trtdate date9.;
datalines;
1 2016-11 09JUL2016
2 2016-06 17JUL2016
3 2016-07 17JUL2016
4 2017-01 25NOV2016
;