SAS does not let me assign 29-Feb-4000 as a valid date.
Tt looks like it is defining years divisible by 4000 as not leap years. I think this is incorrect.
I tried 29-FEB-8000 and that generates an error too.
28 a_date = '29FEB4000'd; output;
____________
77
ERROR: Invalid date/time/datetime constant '29FEB4000'd.
ERROR 77-185: Invalid number conversion on '29FEB4000'd.
According to this article, 4000 is not a leap year.
Well, that is how SAS handles leap years. I read somewhere that in Excel, 4000 is a leap year.
One might ask why is so important to have a 29 Feb 4000 date. or 8000, 12000, 16000?
Once the programming is set for the rules to exclude 4000 why might you think 8000 would be different.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.