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
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.