Hi,
I have a txt file which looks like
ID SNO start stop Lon Len Tod date
1 2 09/02/2003 12/06/2020 10004 10006 10007 20040809
the start and stop are in mm/dd/yyyy format
date is yyyymmdd format.
I want all the txt to convert to SAS dataset.
And the date must be formatted to mm/dd/yyyy
can I do this in SAS?
Google is your friend. Use the data step and the Infile Statement 🙂
data want; input ID $ SNO $ start :mmddyy10. stop :mmddyy10. Lon Len Tod date :yymmdd8.; format start stop date mmddyy10.; datalines; 1 2 09/02/2003 12/06/2020 10004 10006 10007 20040809 ;
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!
Submit your idea!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.