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: 683

Re: Format Date 9 to character

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
  • 408 views
  • 4 likes
  • 2 in conversation