?
Solved

Checking for dates six months or older  - SAS

Posted on 2012-04-10
1
Medium Priority
?
552 Views
Last Modified: 2012-04-11
How do I check for a date (Date_A) six months or older than today's date in SAS?
0
Comment
Question by:morinia
[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 14

Accepted Solution

by:
Aloysius Low earned 1000 total points
ID: 37831016
use the INTNX function (within PROC SQL or data step):
New_Date = INTNX("month", Date_A ,-6, "[alignment]");

where alignment is:
BEGINNING
MIDDLE
END

using today's date (11 Apr 2012),
BEGINNING gives you 01 Oct 2011
MIDDLE gives you 16 Oct 2011
END gives you 31 Oct 2011

so you have to decide which date you are interested in ;)
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

770 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