DATA Step, Macro, Functions and more

How to select dates that are complete

Accepted Solution Solved
Reply
Super Contributor
Posts: 272
Accepted Solution

How to select dates that are complete

Dear ,

 

In my data I have a variable with complete and incomplete dates. I need to convert only complete dates into numeric form. 

 

Variable

2016-06-16

2015-05

 

I need convert only first observation into numeric form. Please help. Thank you.

 

 


Accepted Solutions
Solution
‎06-16-2016 01:39 AM
Occasional Contributor
Posts: 8

Re: How to select dates that are complete

Posted in reply to knveraraju91

if length(variable)=10 then variable_num=input(variable, yymmdd10.);

View solution in original post


All Replies
Solution
‎06-16-2016 01:39 AM
Occasional Contributor
Posts: 8

Re: How to select dates that are complete

Posted in reply to knveraraju91

if length(variable)=10 then variable_num=input(variable, yymmdd10.);

Super User
Posts: 10,035

Re: How to select dates that are complete

Posted in reply to knveraraju91
want=input(variable, ?? yymmdd10.);
☑ This topic is solved.

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

Discussion stats
  • 2 replies
  • 214 views
  • 2 likes
  • 3 in conversation