• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 917
  • Last Modified:

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

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
morinia
Asked:
morinia
1 Solution
 
theartfuldazzlerCommented:
Hi

Use DATEPART function:

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

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now