Date: Sun, 6 Feb 2011 14:26:03 -0500
Reply-To: Nat Wooding <nathani@VERIZON.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <nathani@VERIZON.NET>
Subject: Re: datetime format in excel
In-Reply-To: <017FB41275AE7A46988755E60E32F40105377FDE70@UTHCMS3.uthouston.edu>
Content-Type: text/plain; charset="US-ASCII"
Paul
Are you running 9.2 and if so, have you tried using the Excel Libname?
Here is a sample that I keep. In your case, you would need to use a datetime
informat.
Nat
libname test 'c:\park\TestReadTime.xls' ;
;
Data test;
set test.'test$'n (sasdatefmt=( time ='time8.'));** this is needed to
read a time value;
run;
libname test clear;
run;
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Swank,
Paul R
Sent: Sunday, February 06, 2011 1:34 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: datetime format in excel
Thanks for the tip but it seems to have been the format defaulted to date
rather than datetime.
Paul
Dr. Paul R. Swank,
Professor and Director of Research
Children's Learning Institute
University of Texas Health Science Center-Houston
-----Original Message-----
From: Arthur Tabachneck [mailto:art297@ROGERS.COM]
Sent: Saturday, February 05, 2011 12:05 PM
To: SAS-L@LISTSERV.UGA.EDU; Swank, Paul R
Subject: Re: datetime format in excel
Paul,
Did you set the following options?:
USEDATE=YES;
SCANTIME=YES;
Art
-------
On Sat, 5 Feb 2011 11:26:51 -0600, Swank, Paul R <Paul.R.Swank@UTH.TMC.EDU>
wrote:
>I am attempting to use proc import to import an excel file with a datetime
variable. However, the sas variable is just a date. No time. Any ideas?
>
>Paul
>
>Dr. Paul R. Swank,
>Professor and Director of Research
>Children's Learning Institute
>University of Texas Health Science Center-Houston