<p>I am converting an excel sheet formula to java but I can't understand how excel manages to take the following: 0.22
Applies a formula: =TEXT(R5/14, "h:mm")
and somehow arrives at: 0.22</p>

<p>Again if I provide: 2.8
it arrives at 4.48
Can someone please explain to me how it does this. I have read a little regarding decimal and I understand the conversion but this hasn't yet helped to explain the above.</p>

Yeah it is a bit goofy.  Take the /14 out and that helps.  Basically 1=1 day so R5 is expressed in 14ths of a day.  You could probably do
```
```
int msInADay= 86400000;
Time value = new Time(R5/14 * msInADay);
```
```
but it is untested.