Solved

Sas Dates

Posted on 2011-09-27
1
238 Views
Last Modified: 2013-11-16
Hi,

I read in SAS an access table with 2 dates. This is in the access-table a long integer e.g.
39814 which represents 01/01/2009.
When i read this table in SAS then i get 02/01/1969.
When i add 21916 to this number (diff between 01/01/1900 - 01/01/1960) then i get 04/01/29, i think 2029.
What i'am doing wrong?

Tx
0
Comment
Question by:sonmic
1 Comment
 
LVL 11

Accepted Solution

by:
theartfuldazzler earned 500 total points
ID: 36708382
Hi

data _null_;
  x= 39814;
  put x= DATE9.;
RUN;

The code gives 2Jan2069.

You should minus (not plus) 21916.

data _null_;
  x= 39814 - 21916;
  put x= DATE9.;
RUN;

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now