10-24-2012 02:43 PM
Hi, I havea data format as such MMDDYYP10. (samples below), I'm trying to get the months out of the dat but in a MONNAME. format.
Date_A = Month (Date);
Format Date_A MONANME. but this didn't quite work
10-24-2012 03:34 PM
Hi Reeza, when I export it to Excel the date_a doesn't come across as only Month , but as the whole date similar to date. In SAS it shows correct, how I would like it to.
10-24-2012 05:00 PM
You exported the data with proc export?
By definition SAS does not export formats to Excel using proc export.
Instead you can create a new variable using the put statement that will recode the data and then export.
10-24-2012 05:40 PM
PROC EXPORT does not keep formats, but the ODS tagsets does.
Below is a sample code that will keep ALL your formats.
ods listing close;
ods tagsets.excelxp path = "&output_path." file="&data..xml"
ods tagsets.excelxp options(sheet_name="sheetname");
proc print noobs label data = &data.;
ods tagsets.excelxp close;