From: Jairaj Sathyanarayana on 30 Aug 2006 17:15 Read the data from Excel into SAS using whatever method you prefer. The SAS dataset will have 4 vars--- month, day, hour, min. Then this data step should do the job--- data yourdata2; set yourdata; format date mmddyy10. time1 hhmm8.2; date=mdy(month,day,1994); time1=hms(hour,min,00); time2=put(hour,z2.)||':'||put(min,z2.); run; Hope this helps. Jairaj On 8/30/06, Westcotter <westcotter(a)yahoo.com> wrote: > > Dear all, > I have a data format in Excel as: > Month Day Hour Min > 4 4 14 10 > 4 4 14 15 > 4 6 10 50 > 4 6 10 55 > 4 6 11 5 > 4 17 7 0 > > And I try to convert them into the following format > with two variables: > > Date time > 4/4/1994 14:10 > 4/17/1994 7:00 > .... > > How can I do it? > > Thanks so much > > Kangsheng > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com >
|
Pages: 1 Prev: Help: fuzzy match in string Next: Accessing SAS ODBC DSN - Urgent |