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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.