how to transform 23,1875 into 556:30h

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.

How can I transform 23,1875 into 556:30h

I'm trying to use format short time but the result is 12:00h instead of
556:30h

Thanks,
marco
 
What is 23,1875? Is that a number of seconds? Number of Days and partial
days?

Assuming number of days and partial days. Try multiplying by 24 to get the
hours
Int(N * 24)
To get the minutes
(N*24 - Int(N*24)) * 60
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Hi,

I tried with this value: 4,375 (it's the sames as 105h)

This was the result:
Hours Minutes Hours and Minuts
104 60 104:00


So I tried without the INT and it worked.

Why?

Regards,
Marco
 
Floating point numbers are the problem. You cannot do totally accurate math
when the numbers have a decimal portion. Are you sure that the value was
exactly 4,375?
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Hi. How can I convert this values:

This is what I have This is what I need
3,416666667 82:00:00
8,604166667 206:30:00
0,395833333 9:30:00
4,375 105:00:00
2,0625 49:30:00
4,770833333 114:30:00
0,125 3:00:00
3,291666667 79:00:00


I using this 4 formulas: (but without results)
1 - FixHoras24: CInt([sumofValorDecimal]*24)
2 - FixHoras: CInt([sumofValorDecimal])
3 - FixMinutos: ([sumofValorDecimal]-[FixHoras])
4 - TotalHoras: CInt([FixHoras24]) & Format(([FixMinutos]);"\:nn")

If I change CInt to Int or Fix the result is one hour more or less.

Please help me here.

Regards,
Marco
 
Back
Top