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!

Badge Swipe

Status
Not open for further replies.

mptwoadmin

Programmer
May 15, 2006
46
0
0
US
Hi, I am looking for help/advice on a problem i am trying to resolve. I have badge swipes that have the employee badge number and a time stamp.


machine badge number date/time
01 00001 09/25/09 08:00 - swiped in
01 00001 09/25/09 08:25 - swiped out
01 00001 09/25/09 08:35 - swipe in
02 00002 09/25/09 08:00 - swiped in

What i am trying to come up with is an accurate way to get the time difference between the swipe in and swipe out of a badge number. In badge "00001" the employee swipe in/out then back in so they would be considered currently swiped into machine. Then machine "02" an employee swiped in.

Can someone lend some advice, i cannot think this logic through and I feel stumped.

this is the way I am trying to get the data to come out. If an employee has a swipe in the a swipe out (use the swipe in time and swipe out) but if the employee only has one swipe in the use the swipe in time and the current time as their swipe out (since they are still on the machine).


machine badge swipe in time swipe out time
01 - 00001 - 09/25/09 08:00 - 09/25/09 08:25
01 - 00001 - 09/25/09 08:35 - #now()#
02 - 00002 - 09/25/09 08:00 - #now()#


Thanks
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top