| Date: | Tue, 18 Jul 2006 14:59:45 -0400 |
| Reply-To: | Sophie <sophiestat@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Sophie <sophiestat@GMAIL.COM> |
| Subject: | Re: EXCEL character into SAS date |
|
| In-Reply-To: | <9cf594b50607181142n2db5b0dbr7a05fa7ccb7444a2@mail.gmail.com> |
| Content-Type: | text/plain; charset=ISO-8859-1; format=flowed |
Hi, please ignore the second one. Here is another solusion.
DATA BIRTH3;
SET BIRTH;
DOBN=INPUT(COMPRESS(DOB,'/'),DDMMYY8.);
RUN;
Sophie
* *
> On 7/18/06, Yu Zhang < zhangyu05@gmail.com> wrote:
> > >
> > > Using the date informat to convert it to the SAS date variable.
> > >
> > >
> > > DATA BIRTH;
> > > INPUT ID DOB$;
> > > cards;
> > > 1 24/03/95
> > > 2 21/03/98
> > > ;
> > > run;
> > >
> > > proc print;
> > > run;
> > >
> > >
> > > On 7/18/06, Dr. Abid Shah < abid.shah@hotmail.com> wrote:
> > > >
> > > > I have an excel data file with date entered as 24/03/95 but when I
> > > export
> > > > it
> > > > in SAS it stay same, and look like it was entered as character. I am
> > > > wondering if I could read this character value as date in SAS or
> > > could
> > > > convert it into SASDATE.
> > > >
> > > > DATA BIRTH;
> > > > INPUT ID DOB$;
> > > > cards;
> > > > 1 24/03/95
> > > > 2 21/03/98
> > > > .
> > > > .
> > > > ;
> > > >
> > > > Thanks in advance.
> > > >
> > > > _________________________________________________________________
> > > > Play Q6 for your chance to WIN great prizes.
> > > > http://q6trivia.imagine-live.com/enca/landing
> > > >
> > >
> >
> >
|