Date: Wed, 5 May 1999 11:40:05 -0400
Reply-To: bill_droogendyk@DOFASCO.CA
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "W. Droogendyk" <bill_droogendyk@DOFASCO.CA>
Subject: Re: reading data with the date format.
Content-Type: text/plain
Panos:
depending on the format of the 3 variables that you have, the mdy function
may be all that you need e.g.
date=mdy(month,day,year)
It will then be a sas date value which you can format in any way you wish.
hth
W. (Bill) Droogendyk
Quality Systems, Dofasco Inc.
Hamilton, Ontario, Canada
Voice: 905 548 7200 x3359
Fax: 905 548 4007
email: <mailto:bill_droogendyk@dofasco.ca> bill_droogendyk@dofasco.ca
-----Original Message-----
From: Panos PAPANIKOLAOU [SMTP:PapanikolaouP@CARDIFF.AC.UK]
Sent: Wednesday, May 05, 1999 12:16
To: SAS-L@UGA.CC.UGA.EDU
Subject: Re: reading data with the date format.
Dear All,
I have three distict variables each of those indicates the day, the
month and the year of an event such as the admission to the
hospital.
I want to create a new variable which will be such as:
day-month-year.
That is, I want SAS to read this variable with the date format.
One thought is to do in two steps by using the trim function. First,
you create a new variable for day and month such as:
X=day||trim(month) ; you can then repeat this step for year and thus
creating a new variable Y, ie., Y=X||trim(year) ;
I do not know whether or this is the right course of action.
Equally, I am not sure how I would read this new variable in the
date format. That is, how would i have SAS to read Y in date format.
I would appreciate if I would have comments and ideas on how to
proceed, please.
Thank you very much indeed for taking the time to consider my
request. I look forward to hearing from you.
Regards
Panos Papanikolaou.