Hey,
I would like to convert seconds (as 1897 seconds) in a minutes format (not hours).
Can you help me please ?
Thank !!
Divide by 60.
If you want to display seconds as minutes, use the mmss. format.
data _null_;
sec=1897;
format sec mmss.;
put sec;
run;
I just want to create a new variable (column) which will convert one existing variable in seconds in minutes
In that case
data _null_;
sec=1897;
min=sec/60;
put sec= min=;
run;
But : 1789 seconds / 60 = 29.82 minutes which is not in a good format
@11205213 wrote:
But : 1789 seconds / 60 = 29.82 minutes which is not in a good format
If you want those .82 m displayed as seconds, use the mmss. format, as already advised.
OK thank you very much !
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: