Date: Thu, 21 May 1998 17:00:00 -0400
Reply-To: HERMANS1 <HERMANS1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: HERMANS1 <HERMANS1@WESTAT.COM>
Subject: data test;
This example illustrates methods for converting data elements from one type to
another, and it shows how you can define composite functions. Also, it proves a
reasonably good way to solve your problem. Sig
data test;
input ndate;
date=input(substr(put(ndate,8.),5,2)||substr(put(ndate,8.),7,2)||
substr(put(ndate,8.),1,4),mmddyy10.);
cards;
19940102
18761122
19451218
;
run;
proc print;
format date date9. ;
run;
__________________________ Original Message ________________________________
I was given a permanent sas data set with dates as numeric fields, in the
'yyyymmdd' format. I need to convert these somehow to sas dates so they may
be used in comparisons and calculations. Mainly, I need to merge this data
set with another, only when one date is prior to another. Does anyone have
any suggestions for me as to converting these dates? Thanks.
Melanie Barish
Sr. Data Analyst
IPRO
Lake Success, NY
MelliJ@aol.com
|