Converting an integer to hours in a query

G

gmoss

I am trying to calculate the amount of time left for an operation and convert
it to hours. (Qty remaining/machine speed per hour) - this gives me the
number of hours remaining as an integer
I would like to estimate the time of day that the job is expected to be
completed using 8:00 am as the start time for the schedule.

Any ideas would be appreciated
 
M

MGFoster

gmoss said:
I am trying to calculate the amount of time left for an operation and convert
it to hours. (Qty remaining/machine speed per hour) - this gives me the
number of hours remaining as an integer
I would like to estimate the time of day that the job is expected to be
completed using 8:00 am as the start time for the schedule.

Any ideas would be appreciated


DateAdd("h", 8, Date() + #08:00#)
 
K

Ken Snell MVP

You could use a calculated field with this expression:

EndingTime: #8 AM# + [Qty remaining] / [Machine Speed per hour] / 24
 
G

gmoss

Thanks it worked well

Ken Snell MVP said:
You could use a calculated field with this expression:

EndingTime: #8 AM# + [Qty remaining] / [Machine Speed per hour] / 24

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


gmoss said:
I am trying to calculate the amount of time left for an operation and
convert
it to hours. (Qty remaining/machine speed per hour) - this gives me the
number of hours remaining as an integer
I would like to estimate the time of day that the job is expected to be
completed using 8:00 am as the start time for the schedule.

Any ideas would be appreciated
 
K

Ken Snell MVP

Additionally, the DateAdd function could be used (as suggested by MGFoster):

EndingTime: DateAdd("h", [Qty remaining] / [Machine Speed per hour] / 24, #8
AM#)
--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/



gmoss said:
Thanks it worked well

Ken Snell MVP said:
You could use a calculated field with this expression:

EndingTime: #8 AM# + [Qty remaining] / [Machine Speed per hour] / 24

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


gmoss said:
I am trying to calculate the amount of time left for an operation and
convert
it to hours. (Qty remaining/machine speed per hour) - this gives me the
number of hours remaining as an integer
I would like to estimate the time of day that the job is expected to be
completed using 8:00 am as the start time for the schedule.

Any ideas would be appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top