View Full Version : Day 1 in SAS
It looks like day 1 in SAS is January 1, 1960. What is the significance of this day?
data day1;
yr=year(0);
mon=month(0);
d=day(0);
proc print data=day1 noobs;
run;
results:
yr mon d
1960 1 1
thing
05-15-2008, 12:59 AM
That is correct. Obviously, the people who programmed SAS are fools. If they had ever used Excel, they would have known that day 0 is 1/1/1900.
GadgetGeek
05-15-2008, 08:29 AM
It looks like day 1 in SAS is January 1, 1960. What is the significance of this day?
The Republic of Cameroon achieves independence from France and the United Kingdom of Great Britain and Northern Ireland (http://en.wikipedia.org/wiki/January_1)
The Republic of Cameroon achieves independence from France and the United Kingdom of Great Britain and Northern Ireland (http://en.wikipedia.org/wiki/January_1)
More likely, somebody on the programming staff was born that year. :roll:
Whatever, too bad it didn't get adjusted for Y2K compliance.
RateMe
05-15-2008, 09:06 AM
Odd that they chose 10 years before the *nix epoch.
arsenalplaya
05-15-2008, 09:11 AM
That is correct. Obviously, the people who programmed SAS are fools. If they had ever used Excel, they would have known that day 0 is 1/1/1900.
Or 1/1/1904 if on a Mac
ultrafilter
05-15-2008, 09:15 AM
Odd that they chose 10 years before the *nix epoch.
That's what I was thinking. I did hear an explanation for this once, and it made sense at the time, but I've completely forgotten it.
BradF
05-17-2008, 07:37 PM
SAS was created before Excel -Excel was originally written for the 512K Apple Macintosh in 1984-1985 - Hence I don't think that the SAS folks are fools. Both programs have their strengths and weaknesses.
Off the SAS web site: SAS (pronounced "sass"), which once stood for "statistical analysis software," was created by Jim Goodnight and N.C. State University colleagues, including John Sall, in the early 1970s to analyze agricultural-research data. SAS Institute was founded in 1976 to develop and sell the software as demand mushroomed.
The date was set at the number of days since jan 1 1960 (Why? Ask Dr. Goodnight.) But it is just as good as any other number.
Another SAS type program SPSS uses the number of days since the introduction of the Georgian calendar October 14, 1582. This one makes the most sense. But here again as long as you know where they are counting from it doesn't matter much
FYI - SAS was Y2k complaint the day it was written since it used the number of days instead of the way I have seen many COBOL programers trying to save space and using basiclly a text field that contained a two digit year.
ACCtuary
06-03-2008, 10:29 PM
Odd that they chose 10 years before the *nix epoch.
SAS was developed on an IBM mainframe in the pre-unix days, but the reasons for using it are similar.
Tony [Barr] was looking for a timestamp that would pre-date most electronic records that were available in the early seventies, so he selected the 1960 date.
Tony also wanted to ensure that the timestamps would fit into less storage space, and selecting a more recent base date than the IBM base January 1, 1900, would allow this. The date January 1, 1960 was also close to the release date of the IBM System 360 architecture (which is recognized to be in April 1964). Remember that, at the time, SAS was only running on the IBM mainframes, hence the 360-centric mind-set.
The full story is at http://support.sas.com/community/newsletters/news/insider/dates.html
Yes, I have a life. So to speak.
Tight Tin Foil Hat
06-04-2008, 11:31 AM
I think I read in The Little SAS Book (http://www.amazon.com/Little-SAS-Book-Primer-Third/dp/1590473337/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1212593244&sr=8-1) that there is absolutely no significance for this date.
ACCtuary
06-04-2008, 02:18 PM
I think I read in The Little SAS Book (http://www.amazon.com/Little-SAS-Book-Primer-Third/dp/1590473337/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1212593244&sr=8-1) that there is absolutely no significance for this date.
What they meant by that is that there is no 'secret story' regarding Goodnight's or anybody else's personal life. The date was not chosen completely arbitrarily. Quite a few amusing but irrelevant legends had started swirling around at the time they had written the book, and they were just trying keep people focused on work rather than speculation.
ACCtuary
06-04-2008, 02:20 PM
It looks like day 1 in SAS is January 1, 1960. What is the significance of this day?
results:
By your own admission, this is day zero.
Tight Tin Foil Hat
06-04-2008, 02:21 PM
:oops:
ACCtuary
06-04-2008, 02:22 PM
:oops:Yeah, I've probably spent more time in this thread than is productive or advisable. I think I need exams to keep me honest
vBulletin® v3.7.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.