Hi Folks, I have a piece of code that I use (below) to default missing days from partial dates to the first of the month when appropriate but in this case I need to default the missing days to the end of the month, which seems more complicated to a novice like me since the last day of the month can vary. Any ideas how to proceed? /* month and year entered, default to start of month */ if substr(eoslvdat,1,1) = '-' and substr(eoslvdat,3,1) ne '-' then eoslvdtn=input(trim('01')||substr(eoslvdat,3),date9.) data WORK.EOS;
infile datalines dsd truncover;
input _usubjid:$6. eoslvdat:$9.;
label _usubjid="Unique Subject Identifier" eoslvdat="Date of last visit";
datalines;
01/001 25APR2019
01/002 02MAY2019
01/003 08OCT2018
01/004 15NOV2018
01/005 12JUN2018
01/006 06JUN2019
01/007 --DEC2018
;;;;
... View more