Hi SAS helpers,
I need to output some data storing in SAS as seconds to excel file by using ODS excel proc report.
If the data in sas are numbers and when I output to excel, I need the data format like MM:SS.
my SAS data output to excel
22 0:22 or 00:22
35 0:35 or 00:35
216 3:36 or 03:36
21 0:21 or 00:21
How do I format the data?
I used
proc report data=outtable nowd;
column ("time" meant stdt);
define meant/center display "Mean of Time" format=time. (or time8.);
define stdt/center display "SD of Time" format=time. (or time8.);
run;
Then I got the excel output results like:
my SAS data output to excel
22 00 :00:22
35 00:00:35
216 00:03:36
21 00:00:21
But that is not what I want. Could anybody help me out? Thanks for any suggestion.
Hello, I already solved that problem by using format=mmss. instead of format=time8..
Thank you for the reply, Reeza
Look up TAGATTR to see how to set the time in the Excel format required.
@daisy6 wrote:
Hi SAS helpers,
I need to output some data storing in SAS as seconds to excel file by using ODS excel proc report.
If the data in sas are numbers and when I output to excel, I need the data format like MM:SS.
my SAS data output to excel
22 0:22 or 00:22
35 0:35 or 00:35
216 3:36 or 03:36
21 0:21 or 00:21
How do I format the data?
I used
proc report data=outtable nowd;
column ("time" meant stdt);
define meant/center display "Mean of Time" format=time. (or time8.);
define stdt/center display "SD of Time" format=time. (or time8.);
run;
Then I got the excel output results like:
my SAS data output to excel
22 00 :00:22
35 00:00:35
216 00:03:36
21 00:00:21
But that is not what I want. Could anybody help me out? Thanks for any suggestion.
Hello, I already solved that problem by using format=mmss. instead of format=time8..
Thank you for the reply, Reeza
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 how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.