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

Time Calculations 1

Status
Not open for further replies.

cell0042

Programmer
Nov 5, 2002
16
US
I have a Field called "time" where I can input hours for the day. Then i have another field in which I can subtract hours and minutes. For instance if someone took lunch for 34 minutes I would be able to subtract that from the time. I can always get my total time for a single day. when I go to run a query that will show total hours for a week I have to change the format of my time(ex. 12.50 instead of 12:30)
Right Now My field type is Date/Time. Do I need to change it to numeric so I can get total hours down to last minute for a week instead of trying to figure 21.98 hrs.

This is what I put in my query for total Time.
=Format([Time]-[TimeOff], hh:mm) Like I said I can get it for one day but not more than 24 hours. PLEASE HELP
 
cell: sounds like your approach would work but I would thnk that you'd have to use the entire field, including date, e.g.,

1/2/02 12:12:04

without the "date" I don't see how it could do this. If your saying that you have data in your table like:

1/1/03 4 hrs
1/3/03 2.5 hrs

etc... well, that would be numeric. I would try to format the original cell so that the date is included (a long date format)
 
To convert 21.98 hours to hh:mm use this expression.
Int([SumofTotalHrs]) & ":" & Int(([SumofTotalHrs]-Int([SumofTotalHrs]))*60)

21.98 return 21:58

Paul
 
Killing time (hee hee!!) waiting for my email to ring.
Thanks for the *

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top