Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3962382
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:05:23+00:00 2026-05-20T03:05:23+00:00

I need to perform a time sheet calculations Employee will punch in and punch

  • 0

I need to perform a time sheet calculations Employee will punch in and punch out. I store those records in one table. That table has time and a field for in punch or out punch. Employee may go out for lunch or other reasons and punches for out and in. I need to deduct those times and get the working hours. My table will look like below :

PunchTime  EmpCode    IsInpunch
10:01 AM   (A)        T
12:03 PM   (A)        F            (this isoutpunch) 
01:05 PM   (A)        T
07:14 PM   (A)        F
10:32 AM   (B)        T

For (A)’s time 7.14 – 10.01 is the total hours, but he was not there between 12.03 to 01.05 so I need to deduct the lunch time and get the total hours. How to do this in Query

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T03:05:23+00:00Added an answer on May 20, 2026 at 3:05 am

    This is pretty straightforward. Assuming your T and F IsInPunch is balanced, which is to say for any day, you will have T-F or T-F-T-F etc (always paired), just total up the F and subtract the total of T’s.

    select empcode, DateValue(PunchTime),
        sum(IIF(IsInPunch='F',PunchTime,0)) -
        sum(IIF(IsInPunch='T',PunchTime,0))
    from TimeSheet
    group by empcode, DateValue(PunchTime)
    

    (haven’t got Access open but do check the syntax)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to perform an action after a session times out. However I have
In C programming, whenever I try to perform first time cat, I need to
I am having a table which has about 17 fields. I need to perform
hi i am doing one app here when i click button that time i
For an assignment I am developing an application that need to perform insertions in
I have table that contains more than 12 millions of rows. I need to
I need to perform long-running operation in ruby/rails asynchronously. Googling around one of the
I need to perform the following on MySQL/InnoDB. Assume I have a table consists
I need to perform an ajax request to send some data server-side every time
I need to perform several post-validations in a Symfony form. First time I came

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.