Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identifying data where month is not equal to specified month

Status
Not open for further replies.

STRookie

Technical User
Oct 18, 2010
2
0
0
US
Hi there,
I have a table with a column of dates in which I need to identify and isolate those dates that are NOT in Septemer. The data is formatted as num Date9.
NIPR_EXP_DT1
8/31/2012
2/20/2012
9/18/2013
9/10/2013
9/10/2013
9/10/2013
9/5/2013
9/13/2013
6/30/2012
9/9/2013
Any help will be greatly appreciated!
Thanks!
 
take the date variable and use if condition to filter the data
 
Hi STrookie,

The month function will return the integer month from a SAS date. So you can subset for dates not on the 9th month:

Code:
*display dates not in September(month 9) ;
if month(nipr_exp_dt1) ne 9 ;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top