DATA Step, Macro, Functions and more

convert date of birth to mm/dd/yyyy

Accepted Solution Solved
Reply
Super Contributor
Posts: 279
Accepted Solution

convert date of birth to mm/dd/yyyy

I have date like so:

11399

101897

82898

 

the data is read in as numeric.

 

data I want:

01/13/1999

10/18/1997

08/28/1998


Accepted Solutions
Solution
‎04-20-2017 03:09 PM
Super User
Posts: 11,343

Re: convert date of birth to mm/dd/yyyy

data want;

   set have;

   Newdate = input(put(date,z6.),mmddyy6.);

   format newdate mmddyy10.;

run;

View solution in original post


All Replies
Solution
‎04-20-2017 03:09 PM
Super User
Posts: 11,343

Re: convert date of birth to mm/dd/yyyy

data want;

   set have;

   Newdate = input(put(date,z6.),mmddyy6.);

   format newdate mmddyy10.;

run;

☑ This topic is solved.

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

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