Dates (and other numbers)
The point of this example is that numbers can appear in different ways in different places.
The number "012366" is just a character string-as is all information read by an INPUT statement. The way you read in a set of characters into SAS is by using an INPUT statement. The MMDDYY6. informat tells SAS to read 6 characters and store the result as a numeric value-a floating point number-after taking into account that the characters really "months", "days", and "years."
The number "2214" is the number of days between 1 January 1960 and 23 January 1966 (ie 012366). This is the way this number appears in the sas dataset.
The numbers "01/23/66" is the way this sas date value (2214) is printed by PROC PRINT. The FORMAT statement told sas to print it using the mmddyy8. format.
That is, this single data value appeared in three places:
012366 appeared as a set of characters in the file to be read.
The same value, 2214, appeared in the sas dataset (actually stored as a floating point number).
The value was printed out in the output (as text, appearing as 01/23/66).
How it appears in the three places was different, but it was-conceptually-the same date.
These style differences were handled by sas informats-to read text into the sas dataset-and by sas formats-to print a number so we can read it.