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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 1892 views
  • 0 likes
  • 3 in conversation