If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Time and Attendance System Query
I am attempting to query a time and attendance database (Attendance
Enterprise by Infotronics) to determine the hours worked for any range of time periods, classes of employees, shifts, etc. While I am not entirely familiar with this database, it appears that in order to get the most recent information, I need to use the "Transactions" table, which has the following fields: UNIQUEID FILEKEY (identifies the employee) DTTMSTAMP (date time stamp) TRANSTYPE (actual punch or manual correction) STATION (identifies the facility) PERIOD (not populated) A record is written every time an employee punches. It appears that the only way to determine hours worked is to calculate time elapsed between records. In order to get total hours worked for a day (a day being defined as 7:00 am to 7:00 am), here are the steps that I have come up with: 1) Pull a subset of data for the time period 2) Sort by FILEKEY, then DTTMSTAMP 3) Establish a new field called EMPTRANSNUM, which would number each transaction for each employee 4) Make the assumption that the first transaction is an "in" punch. 5) Calculate time elapsed between transactions for each employee. For example, a normal employee would have 4 transactions, "in" for the day, "out" for lunch, "in" from lunch, and "out" for the day. So, the calculation for this employee would be ((2-1) - (3-2) + (4-3))*24. It is understood that missed punches make complete accuracy impossible. My first question is, how do I populate the EMPTRANSNUM in step 3 above? My second question is, am I missing something that would make this process simpler? Thanks. -- Dan Young |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Please help me fix this flawed query formula | circuit slave | Running & Setting Up Queries | 7 | February 7th, 2006 03:44 AM |
time and attendance | JGB | Worksheet Functions | 0 | January 25th, 2006 05:20 PM |
Adding Multiple rows at a time | Slider | Using Forms | 9 | January 24th, 2006 01:33 PM |
Want current time to be entered w/double click | hiteckchick21 | General Discussion | 3 | May 25th, 2005 04:40 PM |
Query in a query | PPerry | Running & Setting Up Queries | 1 | June 2nd, 2004 05:53 PM |