|
What do YOU what to do? What month would you want to assign when the
month is missing.
data ;
input a$;
if length(a) eq 4 then substr(a,5,2)='01';
d = input(a,yymmn6.);
format d mmyyn.;
cards;
194404
1958
199511
;
run;
proc print;
run;
On 11/5/07, cherub <cherub2life@yahoo.com> wrote:
> Thank for your answer.
> Actually, I found my data is in this format,
> data ;
> input a$;
> cards;
> 194404
> 1958
> 199511
> ;run;
>
> Some obs are followed ccyymm, however, some of these only have ccyy.
>
> do you have any idea how to solve this problem?
>
> Thanks alot.
>
>
>
> "data _null_," <datanull@GMAIL.COM> wrote:
> 29 data _null_;
> 30 y = 'CCYYMM';
> 31 y = '200711';
> 32 d = input(y,yymmn6.);
> 33 format d mmyyn.;
> 34 put (_all_)(=);
> 35 run;
>
> y=200711 d=112007
>
>
> On 11/5/07, cherub wrote:
> > I have a question, there are some date date whose format are ccyymm. Does
> somebody know how to read this data and convert it to mmyyyy?
> >
> > Thanks
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
|