Can you please tell us HOW you imported the Excel spreadsheet into SAS?
For example:
Including code & logs would would also assist us in assisting you.
hi
this looks similar to https://communities.sas.com/t5/General-SAS-Programming/Difference-In-Dates-From-Data-Imported-SAS-Lo...
Bruno
If you used Proc Import to bring the data into SAS you may have fallen somewhat afoul of user data entry and/or other EXCEL behavior. Proc Import uses what the Excel data engine tells SAS the data is in the first few rows. So if you have any data in the data column that is not in exactly the same form as the top 20 rows it gets treated as if it were that format. An obnoxious bit about Excel is depending on how users enter data you may create an Excel date value or a string. The conversion is not the same.
When data is entered manually it may be necessary to highlight your date columns and change the entire column to one type and set the format for all of the cells the same. I usually export to CSV and import that as I have more control and some other issues become more obvious such as changing lengths of charater variables that are supposed to be the same in different files.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.