Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sas Dates

Posted on 2011-09-27
1
Medium Priority
?
280 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 2000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

704 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