time calculation

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

Guest

hey all,

i have a issue tracking application that tracks the amount of time you spend
on a transaction. Well, The data type for the amount of time spent on a
transaction is Decimal.

So for example, 30 minutes in the field shows up as .30, 15 minutes shows up
as .15, and 45 min shows up as .45. Well, if you report off this, the sum
amount of time is off for obvious reasons. And I was just wondering if anyone
knows a quick way to resolve this problem so the reporting would be accurate.

thanks,
rodchar
 
Why is 30 minutes .30? Thirty minutes is .50 in my book (half an hour).

Typically, one would store the number of actual minutes. Tirty minutes
would be 30.00.

You need to tell us how you are getting these numbers. Are they calculated
in some way or are you entering them? If the latter, then you need to
rethink what you are storing. .30 does not equate to 30 minutes in any way
that I can imagine.

More details please.

Rick B
 
These increments are preset choices for users to select minute fractions. I
am not in a position to modify the way the application is designed, however I
do have to report off of this.

I have a solution, but please let me know if this is a good way or if there
is a better way to handle.

I created a Calculated field in a query that has the following syntax:
HoursSpent:
Calculated:
IIf(([TimeSpent]-CInt([TimeSpent]))=0.45,CInt([TimeSpent])+0.75,IIf(([TimeSpent]-CInt([TimeSpent]))=0.3,CInt([TimeSpent])+0.5,IIf(([TimeSpent]-CInt([TimeSpent]))=0.15,CInt([TimeSpent])+0.25)))

It works but just wondering if anyone else has a different way just to get a
variety of feedback.

thanks,
rodchar
 
Back
Top