I am performing a t-test on two time intervals. The variables are formatted HHMM.
The output displays as the unformatted SAS time:
time Mean
No 14859.2
Yes 28801.9
is there a way to get SAS to display the output in HHMM. format, so that the output would look like (and read as time, as in "4 hours and 7 minutes"):
time Mean
No 4:07
Yes 8:00
I'd rather not have to redo it by hand every time if possible. I have tried the FORMAT option on t-test but it had no effect.
Thank you for any ideas.
@strufan wrote:
The time variables are formatted in the data step. The FORMAT statement in PROC TTEST has no effect, unfortunately.
Send output from Proc Ttest into dataset(s). Then use one of the report procedures, Proc Print, Report or Tabulate to display the result where you have more control.
Assign the format in the data step before PROC TTEST. Or use a format statement in PROC TTEST (note: I have not tried this)
@strufan wrote:
The time variables are formatted in the data step. The FORMAT statement in PROC TTEST has no effect, unfortunately.
Send output from Proc Ttest into dataset(s). Then use one of the report procedures, Proc Print, Report or Tabulate to display the result where you have more control.
Thanks. I was hoping to avoid that, but it actually was not too difficult with ODS OUTPUT.
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 16. 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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: