• In the data lines in the DATA step, the first record contains a two-digit year of 25,
and the second record contains a four-digit year of 2025. The century for the first
record defaults to the 2000s because 2025 is in the range of 1926–2025. The four-
digit year in the second record is unaffected by the YEARCUTOFF= option.
• In the third record, the century defaults to the 1900s because the year 1996 is in the
range of 1926–2025.
• The output from the fourth and fifth records show results that are similar to the first
and second records. The fourth record specifies a two-digit year of 12, and the fifth
one specifies a four-digit year of 2012. The century in the fourth record defaults to
the 2000s because 2012 is in the range of 1926–2025. The four-digit year in the fifth
record is unaffected by the YEARCUTOFF= option.
As you can see, specifying a two-digit year might or might not result in the intended
century prefix. The optimal value of the YEARCUTOFF= option depends on the range
of the dates that you are processing.
In releases SAS 6.06 through SAS 6.12, the default value for the YEARCUTOFF=
system option is 1900. Starting with SAS 7, the default value is 1920; starting with SAS
9.4, the default value is 1926.
For more information about how SAS handles dates, see the section on dates, times, and
datetime values.
Practices That Help Ensure Date Integrity
The following practices help ensure that your date values are correct during all the
conversions that occur during processing:
• Store dates as SAS date values, not as simple numeric or character values.
• Use the YEARCUTOFF= system option when converting two-digit dates to SAS
date values.
• Examine sets of raw data coming into your SAS process to make sure that any dates
containing two-digit years are correctly interpreted by the YEARCUTOFF= system
option. Look out for the following situations:
• two-digit years that are distributed over more than a 100-year period. For dates
covering more than a 100-year span, you must either use four-digit years in the
data, or use conditional logic in a DATA step to interpret them correctly.
• two-digit years that need an adjustment to the default YEARCUTOFF= range.
For example, if the default value for YEARCUTOFF= in your operating
environment is 1926 and you have a two-digit date in your data that represents
1925, you have to adjust your YEARCUTOFF= value downward by a year in the
SAS program that processes this value.
• Make sure that output SAS data sets represent dates as SAS date values.
• Check your SAS programs to make sure that formats and informats that use two-digit
years, such as DATE7., MMDDYY6., or MMDDYY8., are reading and writing data
correctly.
Note: The YEARCUTOFF= option has no effect on dates that are already stored as SAS
date values.
114 Chapter 7 • Dates, Times, and Intervals