BookmarkSubscribeRSS Feed
jhaque
Calcite | Level 5
Hi Guys, Please help me out how to handle date below 1582.Its populating missing value whenever date is below 1582 year.
2 REPLIES 2
Kurt_Bremser
Super User

In SAS, you can't.

SAS date and datetime formats do not accept numbers that point to a year before 1582.

It is also impossible to declare a date or datetime constant before 1582.

Cynthia_sas
Diamond | Level 26
Hi:
From the doc:
http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001397898.htm

"Note: SAS date values are valid for dates based on the Gregorian calendar from A.D. 1582 through A.D. 19,900. Use caution when working with historical dates. Although the Gregorian calendar was used throughout most of Europe from 1582, Great Britain and the American colonies did not adopt the calendar until 1752."

If you need to store dates outside of the acceptable range, then you might need to store them as character strings or as separate MONTH, DAY and YEAR numeric variables.

cynthia

ps -- this is an interesting user group presentation with more info/comments about dates: http://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Winnipeg-User-Group/Burchill-G...

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2695 views
  • 0 likes
  • 3 in conversation