Solved

Sas Dates

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
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…

749 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