Solved

Checking for a date > 05/01/2013 in SAS when date in format DATETIME22.3

Posted on 2013-05-14
1
776 Views
Last Modified: 2013-05-15
How do I check a date in SAS in a Data Step when the date is in the format DATETIME22.3 for a date >= 05/01/2013?

The variable is called DateA
0
Comment
Question by:morinia
1 Comment
 
LVL 11

Accepted Solution

by:
theartfuldazzler earned 250 total points
Comment Utility
Hi

Use DATEPART function:

DATA Test;
 set Test;
   WHERE DATEPART(DATEA) >= '01MAY2013"D;
RUN;
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now