Format Date 9 to character

Reply
New Contributor
Posts: 2

Format Date 9 to character

I want to convert date9 to character .

Example if date is 25Jun2012 ,I want to convert it to be 25-Jun-2012)

SAS Super FREQ
Posts: 708

Re: Format Date 9 to character

Posted in reply to Munzhedzi

Have a look at the following code:

data test;
  date_sas = "25Jun2012"d;
  date_c2 = put(date_sas,
date11.);
  date_c2a = propcase(date_c2, "-");
  format date_sas date9.;
run;
Ask a Question
Discussion stats
  • 1 reply
  • 440 views
  • 4 likes
  • 2 in conversation