Decimal Time Problem

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

Guest

Hi,

I have a query that sums up decimal Times, now unfortunately the report i
get these times from will only give them to me in decimal format so my hands
are tied.

however my qury returns the following results to me,

101.67
187.21
109.89

These returns are fine however were the ending result is over 60 i would
like to get the following to occurr i.e where time = 101.67 (one hundred and
one hours, sixty seven minutes) I need it to show as 102.07.

any ideas would be mucho appreciated.
 
Songoku

I think you have to go back to the beginning and look at HOW you are
determing the time (i.e. I am assuming that you are doing something to the
effect of elapsed time or the difference between a start/end time).

When you work this out in "decimals",

15 minutes is (.25).
30 minutes is (.50)
45 minutes is (.75)
60 minutes is (1.0)

Therefore, 101.67 is 67 minutes, its somewhere between 30 and 45 minutes...

So the immediate question I have for you is, how are you computing the
start/end times?

--
Rob

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
I dont, these are pre created/setup within the extracted data.....

The import (report was a bad choice on my part...) data already has start
times and finish times some times these fields are blank .Thereis also a
column which is actual labour hrs. this column is in decmial points i.e 0.5 =
30 mins. I have no control on how these times are taken from the other
database, unfortunatly ll i have to work with are these decimals.
 
Hi,

I have a query that sums up decimal Times, now unfortunately the report i
get these times from will only give them to me in decimal format so my hands
are tied.

however my qury returns the following results to me,

From the reply downthread, I assume that you have a Number field
(Double? Currency?) with 3.25 meaning 3 hours and 25 minutes... right?
And you want to sum these times? If so the problem is even worse than
you present; it's not just that you'll get decimals between 61 and 99,
but that you'll get INCORRECT sums. 1.55 + 1.55 = 3.10, but 1:55 +
1:55 = 3:50!

I'd suggest converting these "visual only no calculations" decimals
into Long Integer minutes (e.g. 10.30 would be 630): an expression

60*Fix([timefield]) + ([timefield] - Fix([timefield]))

wil do this for you. This integer count of minutes can then be summed
correctly; to display it as hours and minuts use an expression

[sumoftime] \ 60 & ":" & Format([sumoftime] MOD 60, "00")

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top