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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time Calculations

Status
Not open for further replies.

joatmofn

Technical User
Jan 12, 2003
72
0
0
US
Hello,

I am looking for an example of time calculations to be used in a timecard application.

I have a form that receives the hours worked for one or MORE individuals who worked on a project. The field is setup as a date/time field.

I need to add all the hours:minutes for all employees who worked on the project for the given day and report the total manhours (for the day).

I've looked in the help files and have looked for examples but haven't been able find a way to perform this type of calculation.

Any help/advice would be appreciated.

Thanks.
 
Hi,

what you could do is to use a query to the table where you have the date/time field. There you filter the records on the current day and sum all the hours of the date/time field in a cross-table query.

good luck!

regards Roltrap
 
I have similar fields on a database I wrote.I use a seperate hour and minute field plus a hidden field which holds the hours mutliplied by 60 plus the minutes giving the total mins for that entry. You can keep adding to this field for each entry on the page. When you wish to display the total man hours use the following: "a" is the total minutes and b and c are just variables to hold the information.


b = Fix(a / 60)
Me![Hours] = b
c = a Mod 60
Me![Mins] = c
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top