Programming the statistical procedures from SAS

subset question

Accepted Solution Solved
Reply
Super Contributor
Posts: 1,040
Accepted Solution

subset question

Hi,

I have two variables like shown below.

i want to pick 2013 data

TIME_In                            TIME_OUT

28DEC2012:14:58           02JAN2013:10:17---------want this

28JAN2013:14:58           02JAN2013:10:17---------want this

28FEB2013:14:58           02FEB2013:10:17-------want this

12NOV2012:07:38          12NOV2012:07:51-------don't want

Thanks


Accepted Solutions
Solution
‎09-26-2013 08:48 PM
Super Contributor
Posts: 307

Re: subset question

Assuming your data are SAS datetime values . . .

Data want ;

     set have ;

     where year ( datepart ( time_out ) ) = 2013;

run;

View solution in original post


All Replies
Solution
‎09-26-2013 08:48 PM
Super Contributor
Posts: 307

Re: subset question

Assuming your data are SAS datetime values . . .

Data want ;

     set have ;

     where year ( datepart ( time_out ) ) = 2013;

run;

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 155 views
  • 0 likes
  • 2 in conversation