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
SAS Super FREQ
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...

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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