Solved

Sas Dates

Posted on 2011-09-27
1
272 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
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…

623 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