I am trying to import data from an excel file with the following format which as some date values missing. can you say how SAS will interpret these missing date values and display them. and is there any other ways to import this file. using university SAS studio.
Name Salary Date of joining
Rob 25680 12/02/2012
Steve 35875 5/17/2010
John 26990
Joe 39995 2/22/2006
Thanks
There should be a task to import data. If it has XLSX or XLS as a file type to import should be able to import.
SAS will set your blank values to missing. This will most likely appear as period when you look at tables. If you get blanks instead then something inhibited SAS from setting the proper date valued numeric variable type. This could happen if the first rows are all missing the value which would make SAS believe the variable is character.
If you do not see XLSX as an acceptable file type (meaning your license may not access to Excel) then save the file as CSV from Excel and import that file.
With the XLSX file of
Name | Salary | date_of_joining |
Rob | 25680 | 12/2/2012 |
Steve | 35875 | 5/17/2010 |
John | 26990 | |
Joe | 39995 | 2/22/2006 |
I get a SAS file of
Name | Salary | date_of_joining |
Rob | 25680 | 2-Dec-12 |
Steve | 35875 | 17-May-10 |
John | 26990 | . |
Joe | 39995 | 22-Feb-06 |
There should be a task to import data. If it has XLSX or XLS as a file type to import should be able to import.
SAS will set your blank values to missing. This will most likely appear as period when you look at tables. If you get blanks instead then something inhibited SAS from setting the proper date valued numeric variable type. This could happen if the first rows are all missing the value which would make SAS believe the variable is character.
If you do not see XLSX as an acceptable file type (meaning your license may not access to Excel) then save the file as CSV from Excel and import that file.
I was wondering how SAS interprets the missing data. Thanks for the clarification.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.