DATA Step, Macro, Functions and more

Convert String to date

Reply
Contributor
Posts: 71

Convert String to date

How to convert string such as 14072017 into date format 14/07/2017?

PROC Star
Posts: 735

Re: Convert String to date

like this

 

data have;
string_date = '14072017';
run;

data want;
	set have;
	num_date = input(string_date, ddmmyy10.);
	format num_date ddmmyy10.;
run;
Ask a Question
Discussion stats
  • 1 reply
  • 100 views
  • 0 likes
  • 2 in conversation