i have the below data:
subj
asdt
svsstd_num
flag
101
2006-01-10
28-dec-05
Y
102
2005-11-15
12OCT2005
Y
102
2005-12-08
07-nov-05
Y
103
2006-01-05
02-dec-05
Y
the svsstd_num date format ias 12OCT2005 however i am not able to make it in excel. but all the date in svsstd_num is the same format.
I am using the below code;
data ae051; set ae98; svsstd_num=input(SVSTDTC,yymmdd10.); format svsstd_num date9.; if visit="Visit 2 (Baseline)" then do; if ASTDT < svsstd_num then flag= "N"; else flag= "Y"; end; run;
which is taking if visit is in visit2 then flag, but if we see the second observation the flag should be "N".
I am not sure why it is not giving the right result.
... View more