LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 5 Nov 2007 10:02:55 -0600
Reply-To:   "data _null_," <datanull@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "data _null_," <datanull@GMAIL.COM>
Subject:   Re: How to read CCYYMM format date?
Comments:   To: cherub <cherub2life@yahoo.com>
In-Reply-To:   <102537.97335.qm@web33305.mail.mud.yahoo.com>
Content-Type:   text/plain; charset=ISO-8859-1

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


Back to: Top of message | Previous page | Main SAS-L page