I have an excel spreadsheet (.xlsx) that has a few fields that are supposed to be dates. Most cells are in a MM/DD/YYYY format but there are other cells that have the word "NULL". When I do a PROC IMPORT, all of the fields come in as character variables and all of the date values are turned into random numbers like 34563. How can I import these date values as the values that they are using PROC IMPORT? Guessingrows doesn't work.
Change the Excel column type of the date columns to "Date" and see if that helps. Having non-missing dates in the first few rows may also help.
Change the Excel column type of the date columns to "Date" and see if that helps. Having non-missing dates in the first few rows may also help.
OK. The typical I'll accept anything you type into a column problem with Excel. AFAIK you can't "lock" the type of column to only accept valid data for that type.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.