Hi everyone,
Hope someone can help.
I have a csv file which looks like:
Var1,Var2
07/08/2006 05:56:22
So Var2 is dd/mm/yyyy with two spaces followed by hh:mm:ss
Could someone please tell me how to import this csv file. For example
when I use: File > Import Data ...
and copy the code from the log, SAS is just reading in the datepart
for that variable, i.e. the code in the log is:
data WORK.ImportedData;
%let _EFIERR_ = 0; /* set the ERROR detection macro variable */
infile 'C:\Book1.csv' delimiter = ',' MISSOVER DSD lrecl=32767
firstobs=2 ;
informat VAR1 $3. ;
informat VAR2 ddmmyy10. ;
format VAR1 $3. ;
format VAR2 ddmmyy10. ;
input
VAR1 $
VAR2
;
if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR
detection macro variable */
run;
Really hope someone can help, hope the question is clear!
Thank you in advance
Andy