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 (July 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments:   To: Yu Zhang <zhangyu05@gmail.com>
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 > > > > > > > > > > >


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