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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.