Thank you very much for help. I created the following code. It produced the output I needed. But I want to know is there any mistake in it. Please provide your thoughts if date1 ^= . then chardate1=put(date1,is8601da.); if compress(date2,'-') = : 'UNUNK' then chardate2= put(input(substr(compress(date2,'-'),6),best.),10.); else if compress(date2,'-') = : 'UN' then chardate3= put(input(substr(compress(date2,'-'),3),monyy7.),yymmd7.); if chardate1 ^= '' then chardate=chardate1; else if chardate2 ^= '' then chardate=chardate2; else if chardate3 ^= '' then chardate=chardate3;
... View more