The issue is I have a column with " On time" which displays 02/20/12 I used MONAME to format to Month "Feb "which is great in my SAS table. The issue is when I export to excel it converts it back 02/20/12 . What can I do to keep the format of Feb ? Thanks for your assitance
try something like
data all;
set all;
on_time_month=put(on_time,monname3.);
run;
Ksharp
You probably need to convert it into character. Excel will not recognize SAS format.
Edit: something like:
data _null_;
a=input ('2/20/12', mmddyy8.);
b=put(a,monname3.);
put a b;
run;
Regards,
Haikuo
I agree we Haikuo. Create a new variable to export. e.g.:
data have;
informat on_time mmddyy8.;
input on_time;
on_time_month=put(on_time,monname3.);
cards;
02/20/12
03/14/12
;
HI Art,
I've a table named 'All' it has 30 columns . Using your data step how would I tie it together to convert my date of 4000 entries to reflect Month but keep the columns . I tried rename my table to the data step 'Have' to ALL an it removed the rest of the columns
Thanks again for your assitance in this matter
try something like
data all;
set all;
on_time_month=put(on_time,monname3.);
run;
Ksharp
The code that both Ksharp and I suggested would take care of it for all 4,000 of your records. I'm not sure what you actually did, as you didn't post the code that you ran.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.