Date: Tue, 4 Mar 2003 09:14:35 -0800
Reply-To: JP <jplecruguel@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: JP <jplecruguel@HOTMAIL.COM>
Organization: http://groups.google.com/
Subject: detect dates for an array
Content-Type: text/plain; charset=ISO-8859-1
Hi all,
I have some access tables to import in SAS on a frequent basis.
I use the Import proc.
PROC IMPORT OUT= IMPORTED.Sect1
DATATABLE= "Sect1"
DBMS=ACCESS97 REPLACE;
DATABASE="C:\unmet needs data All subjects.mdb";
RUN;
My problem is with dates variables. By default, they are set in the
DATETIME format (date + hours...). I want them to be casual SAS date
(day).
I know I cannot specify format or informat in Proc Import.
I use newdate=DATEPART(oldate); to convert my dates.
But how can I do it in an automatic datastep?
I could use an array, but I would like to avoid to specify all the
date variable. Is there any _numeric_ or _character_ thing applicable
to date variables?
The other option would be to write a macro, reading the output from
proc contents to get the list of those with a datetime format.
JP