I’m trying to figure out how to write code for an easy formula you could do on a calculator but not so easy to do in code.
I want to convert a total number of minutes to show both hours and minutes. So if I had 2121 minutes, how many hours and minutes would that be?
Dim H as Single
H = 2121 / 60
H will then = 35.35 hours. But now how do I parse that number and convert it to minutes? If I did it on a calculator, the equation would be
0.35 x 60 = 21 minutes
So the answer would be 35 hours and 21 minutes.
The problem is, I don’t know how to separate the 0.35 from the 35.35.
Any help would be greatly appreciated.