Wednesday, April 2, 2008

For Partial Dates (UN-NOV-2006)

-
*pardt:- partial date;
if pardt ne '' then do;
date = substr(pardt,1,2);
month= substr(pardt,4,3);
year = substr(pardt,8,4);
if (month > '' and date >'' and year >'') then do;*;
if compress(date,'UN')='' then ndate='01';
if compress(ndate,'01')='' then do;
**ndate; 
if month > '' and upcase(month) in
('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC') then do;*** month;
if compress(year,'0123456789')='' then do;****year;
endtc=input(compress(ndatemonthyear),date9.);
end;****;
format endtc yymmdd10.;
endtc1=put(endtc,yymmdd10.);
endtc1=trim(left(endtc1));
enddate=substr(endtc1,1,7);
end;
***;end;**;
end;*;
end;
-
More:
http://www.clinplus.com/vboard/showthread.php?t=8
-

No comments:

Post a Comment