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

Calculate hours

Status
Not open for further replies.

phpatrick

Programmer
Jul 9, 2006
72
BE
Hi,

Situation : someone is getting in on 07.45 AM and leave at 09.15 AM. So you can say he has been there for 1 hour 30.
Because there are at least two checkins and checkouts on a day, I like to count al the minutes between a checkin and a checkout and divide bij 60 to get the hours the person was present.

With wich formula or function do you get the minutes between an beginning time (eg 7.45) and stop time (eg 09.15) 120 minutes.

Person is setting the machine time on clicking (event) on a button.
 
How are ya phpatrick . . .

The following also [blue]allows for midnight crossover[/blue]:
Code:
[blue] DateDiff("n", Me!Time1, Me!Time2) + (Me!Time2 < Me!Time1) * (-1440)[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top