Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating Time in a Report

Status
Not open for further replies.

proximity

Technical User
Sep 19, 2002
132
GB
Hi,

I have a field on a report called 'Sum Of Items_Picked' and another called 'Pick_Hours_Allocated'. The figures displayed on the report come from a query. Now, what I want to do is have a text box do this: =[Sum Of Items_Picked]/[Pick_Hours_Allocated]. The result will tell the viewer how many items an individual has picked per hour. Nice and simple, except all I get is rubbish! All the fields and display formats are set up correctly and I can't see what I am doing wrong. Any help greatly appreciated.
 
I suspect that your 'hours' are actually passed as date/time...which means they are smaller than 1...

1 day = 1
1 hour = 1/24
1 minute = 1/1440
1 second = 1/86400

Try to obtain the hours as integers directly in the query...

HTH [pipe]
Daniel Vlas
Systems Consultant
 
Hi there. You may want to consider converting your hours into a decimal and then divide. The formula would be similar to the following: (Hour([Field Name]))+(ROUND(Minute([Field Name])/60,1)). If your hours are 4:30, this would return 4.5 and allow you the ability to divide. I use this as an expression in a query.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top