Re: ->HR <-> ->HMS Message #3 Posted by Cyril RABIH on 2 Sept 2004, 9:04 a.m., in response to message #1 by Gileno
Hi man, if you really want to have a single équation, I show you what I've found during the last 15 minutes.
H->HMS
f(x)=IP(x)+(1/100)*IP(60.FP(x))+(1/10000)*IP(3600*(FP(x)-(1/60)*IP(60*FP(x))))
HMS->H
f(x)=IP(x)+(1/60)*IP(100*FP(x))+(1/3600)*IP(10000*(FP(x)-(1/100)*IP(100*FP(x)))).
You must enter 15h28mn15s as 15.2815
I've tried it with some examples and I think it's ok.
I hope it will help you.
Edited: 2 Sept 2004, 9:19 a.m.
|