Vision Binary

work hard, be nice, amazing things will happen


SAS input data format (date and blank space embedded)

In SAS , when we import raw data, a blank space is usually to determine a value end and the next begins. Then what if we want to input one value for an objective as one variable? The ampersand format modifier & solve the problem. But to really make things work, the next input variable  value need to be 2 blank space behind the embedded data column.

SAS STUDIO IMPORT DATA WITH BLANK SPACE EMBEDED AND DATETIME INPUT.PNG

$18. —–Length of the data in this variable

mmddyy10. will store input data format like mm/dd/yyyy

mmddyy8. Store data format like mm/dd/yy

you can view the data in correct date time format by type code down below:

print data date10

output:

printdate10

or the code for mmddyy8.

print data date8.PNG

output:

printdate8.PNG

 

 



Leave a comment