Solved

Sas Dates

Posted on 2011-09-27
1
244 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
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…

911 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

24 Experts available now in Live!

Get 1:1 Help Now