I have a number of data files, from different providers, and they used different formats for the dates, like:
yyyymm yyyy-mm mm-yyyy yyyy/mm
Sometimes SAS reads in as bes12. numberic, sometimes SAS reads in as $8. characteric, and sometimes SAS automatically recognizes as date and added the day 01 to become 01MMMYY:00:00:00 format.
So I have to deal with every different case.
I hope there is a way that I can control the import to end up one format in SAS, so that I only need to deal with one format conversion.
Any suggestions?
Thank you!
Firstly, and most important, is to get the transfer agreement in place. This would be a document which details what data, and in what format the data is in. Without this document you will not be sure what the data reflects, or be able to handle changes. Once you have this setup for each vendor then the coding is very simple, a datastep import based on the agreement. Like 90% of programming, the actual work should be in the documentation, the code then writes itself.
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.