Hi All,
I have calculated the time in hours (variable name timehrs) between two datetime variables. I have converted time in hours to time in minutes (timemin). Both of these variables have time formats on them. I'd like to use timemin as a numeric variable to use in bivariate and multivariable calculations. I cannot figure out how to use the actual time in either hours or minutes instead of SAS time. For instance, if the value of timemins should be 1632 minutes, the value being used in calculations is 5875200, which is SAS time. How do I convert timemins and timehrs to real minutes and hours?
My code:
Data have; set a; by Study_Number; btime=dhms(date_b, 0,0,time_b); ctime=dhms(date_c, 0,0,time_c); timehrs=ctime-btime; timemin=(timehrs*60); format btime ctime datetime18. timemin timehrs time4.; run;
... View more