K, I can do it on paper but how do I get a peice of software like excel
to convert 1.3 hours to 1hr 18min or 01:18?
Any help?
Hi:
Given input hours=h,
h hrs = floor(h) hrs, 60*(h-floor(h)) min.
Ex.: input: h=1.3
flr(h)=flr(1.3)=1
60*(h-floor(h)) = 60*(1.3 - 1) = 60*0.3 = 18.
Output: 1.3 hrs = 1hr, 18 min.
Notes: (h-floor(h)) is just the "fractional" component, 0.3 in the given example. Substitutions are, therefore, frac(h) and (60*h)mod(60). Similarly, viable substitutions for flr(h) are, h-frac(h), h-(60*h)mod(60).
These things said, the algorithm in black becomes,
h hrs = flr(h) hrs, 60*(frac(h)) min.
Regards,
Rich B.
I do not think it would be possible to place the value 1 and 18 in the same box but I am certain I have a method where they can be placed in side to side boxes e.g 1 in one box and 18 in the next box on the right hand side.Originally Posted by psylencer
Let me know if this fulfils your requirements.
No doubt someon else will have a better method.![]()
Hi Psylencer:
I am happy to have helped. In all honesty, my programing knowledge is limited. Nonetheless, I am indeed geek enough to help out with the algorithm stuff. In the words of Hewey Lewis, "It's hip to be square" (octagonal is pretty cool too).
Enjoy,
Rich B.