Dear Joost,
I have a question about the format of date. My raw data is TIMESTAMP_UTC 11/3/2015 12:00:02 AM in csv file.
I use import wizard, and the imported date is 11/3/2015. I pressed F4 and got the code:
data RP.fulldata ;
%let _EFIERR_ = 0; /* set the ERROR detection macro variable */
infile 'D:\Desktop\RP\2000-2012.csv' delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;
informat TIMESTAMP_UTC mmddyy10. ;
Then, I changed the format into mdyampm25.2:
data RP.fulldata ;
%let _EFIERR_ = 0; /* set the ERROR detection macro variable */
infile 'D:\Desktop\RP\2000-2012.csv' delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;
informat TIMESTAMP_UTC mdyampm25.2 ;
Then all the TIMESTAMP_UTCs are missing. The note in log is that “Invalid data for TIMESTAMP_UTC”.
I tried another method, and the code is as follows.
proc import datafile="D:\\Desktop\\RP\\2000-2012.csv" dbms=csv out=rp.fulldata replace;
getnames=yes;
guessingrows=32767;
run;
However, the imputed date is like this 03/01/2000. The DESC is that:
data RP.FULLDATA ;
%let _EFIERR_ = 0; /* set the ERROR detection macro variable */
infile 'D:\Desktop\RP\2000-2012.csv' delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;
informat TIMESTAMP_UTC $13. ;
Why the length of the raw data is 13?
I am really confused. Could you help me? Thank you.
Regards,
Emily