BookmarkSubscribeRSS Feed
ChrisHemedinger
Community Manager

As described in this SAS Knowledge Base article, the default setting for the YEARCUTOFF option in most SAS environments is 1940. (As a reminder, the YEARCUTOFF option influences the behavior of how SAS calculates date values that have only a two-digit year.)

 

In SAS Viya 3.5 (and some older SAS 9.4 releases), the YEARCUTOFF default value is still 1926. As we are now in 2026 (happy new year!), this setting can cause issues for SAS programs that access data with date values that rely on two-digit years.

 

You can change the value of YEARCUTOFF by adding an option to your SAS config file (affecting all users and programs), or by using an OPTIONS statement in your affected SAS program. SAS recommends setting the value to 1940 (to be consistent with the shipped default value), but you can decide the best value to use for your situation.

 

To affect just the current program, add this statement at the beginning of your code:

 

options yearcutoff=1940;

 

To affect all programs and users in the SAS environment, add this setting to the SAS config file:

 

-yearcutoff 1940

 

To check the current value of YEARCUTOFF, use this SAS program code:

proc options option=yearcutoff; run;

 

Notes:

  • In SAS 9.4M7 and later, the YEARCUTOFF option is set to 1940 as a default.
  • In SAS Viya 4 (any version), the YEARCUTOFF option is set to 1940 as a default.
SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
1 REPLY 1
SASKiwi
PROC Star

@ChrisHemedinger - Thanks for the post Chris! Given we are still running on SAS 9.4M2 I realised this issue also affects us so this is timely indeed. I've implemented the recommended change and it fixes an error in our business-critical processing. 

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

Learn how to explore data assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1675 views
  • 8 likes
  • 2 in conversation