05-15-2017 09:33 PM
here is my time variable looks like
i am importing the excel file and converting to sas datasets using proc import and some how sas is displaying as 30DEC1899 in most of the observations and few other dates.
here is my code
proc import datafile="location."
i want to read the excel file time variable into sas exactly as i pasted above and the file is .xls format (2016 excel).
05-15-2017 09:55 PM
Did Excel revert back to XLS in 2016?
Try removing the Usedate option unless you need it. Ensure the variable has the correct format in SAS - proc import guesses - and not always correctly.
A SAS time is number of seconds, so without a format it should appear as an integer.
05-15-2017 10:17 PM
I have converted .xlsx to .xls
Will try as per your suggestion
Why? Try the XLSX file using DBMS=XLSX
If the file is XLS its Excel 95-ish not Excel 2016.
05-16-2017 04:23 PM
it looks like in the excel ...one of the values is being entered as date and the rest are time ...so SAS is reading all the values as date ...just figured it...
thank you reeza