Solved

Checking for dates six months or older  - SAS

Posted on 2012-04-10
1
540 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
1 Comment
 
LVL 14

Accepted Solution

by:
Aloysius Low earned 250 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

This article describes some very basic things about SQL Server filegroups.
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…
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…

756 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