Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 1st, 2012  |  syntax: None  |  size: 0.41 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. MS- Access query for total hours and time deduction
  2. PunchTime  EmpCode    IsInpunch
  3. 10:01 AM   (A)        T
  4. 12:03 PM   (A)        F            (this isoutpunch)
  5. 01:05 PM   (A)        T
  6. 07:14 PM   (A)        F
  7. 10:32 AM   (B)        T
  8.        
  9. select empcode, DateValue(PunchTime),
  10.     sum(IIF(IsInPunch='F',PunchTime,0)) -
  11.     sum(IIF(IsInPunch='T',PunchTime,0))
  12. from TimeSheet
  13. group by empcode, DateValue(PunchTime)