02-21-2016 05:38 PM
I'm have a text file with date of birth entered in the format of mm/yyyy in numbers. So for example 5/1985.
When I try to tell sas to read the data with informat - DOB monyy6. it says invalid data for DOB. I'm guessing that it's because it's not a 3 letter representation of a month.
What would be the other informat because I tried mmyy6. and that doesn't exist.
Here's my code:
data temp; infile 'C:\Users\wjeon\Desktop\Masters\Data to William\PEI data/PEItxt.txt' delimiter='09'x dsd missover firstobs=2; length Patient_ID $20; informat Patient_ID $20. Gender 1. DOB mmyy10. Postal_Code $3. Region 1. Date_of_Service mmddyy10. Facility_type_id 2. ICD_9 $4. Specialty 3. Paid_amt best32. Approved_amt best32. Fee_Code $4.; input Patient_ID Gender DOB Postal_Code Region Date_of_Service Facility_type_id ICD_9 Specialty Paid_amt Approved_amt Fee_Code; run;
I also tried to make it read it as characters so that i can try to convert it later on but it still says invalid
Thank you in advance.
02-23-2016 02:37 AM