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 ;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Save the date!
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.