converting time to minutes

P

Patti

I have a table where I store start time and end time for
a project. I need to be able to convert this time into
minutes per day per task. Any help will be appreciated.

Thanks, Patti
 
R

Rick B

just subtract.

Where do you want the results? In a form? On a report?

Just add a text box with something like...

= [EndTime] - [StartTime]

Rick B


I have a table where I store start time and end time for
a project. I need to be able to convert this time into
minutes per day per task. Any help will be appreciated.

Thanks, Patti
 
P

Patti

Rick,
I tried this and ended up with a decimal number. I want
to pull this number into a report but I am trying to
create the time within a query.
 
R

Rick B

Duration is a decimal number. There is no format in Access for HH:MM:SS
other than the time format. There is no "duration" format.

I guess you could do some math and convert it. I have never done it, but I
posted a suggestion about two days ago...

<------------------Text from previous post----------------------->
There should be some samples out there somewhere. Off the top of my head,
I'd probably...

1) round it to a whole number
2) subtract the rounded from the original
3) multiply by 60


for example 1.25
1) 1.00
2) 1.25 - 1.00 = 0.25
3) 0.25 * 60 = 15

Then I'd build my number such as...

[field1] & ":" & [Field3]
1:15


There may be more efficient ways, but something like that would work. I bet
you could even make a public function out of it so you could use hte math
over and over on difffernt numbers.


Rick,
I tried this and ended up with a decimal number. I want
to pull this number into a report but I am trying to
create the time within a query.
 
J

John Spencer (MVP)

You can get the difference between two times by using the DateDiff function.

DateDiff("n",StartTime,EndTime)

That will give you the number of minutes between the two times. (and yes "n" is
minutes, since "m" is months).

Since I have no idea where you get a count of your tasks or the number of days
for a task or project, there is no way I can give you further advice.
 
Top