format and informat in sas -


i have following data:

data d; input date1 $ date2 $; cards; 5oct10  11nov11 6jul12  12oct13 1jan08  4may10 4may04  8jul06 1mar07  5aug07 18may04 1oug09 7aug05  8jul09 1feb03  5apr06 3feb01  15jul08 4apr07 16apr07 run; 

*i need read in date7.informat , present data on date9.format.

*how do read data begin on width format, , how convert date's width 7 9 while cars not numeric?

when trying that:

proc print data=d; format date1 date2 date9.;; run; 

it fails since use numeric format on none-completely numeric var

if use informat statement tell sas how read variables not not need list format in input statement. informat , format variable not need same, in case can because date9 informat recognize value 2 digit year.

informat date1 date2 date9.; format date1 date2 date9.; input date1 date2 ; 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -