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 !
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.