Calculations with hours

Posted on Tuesday, February 19, 2008 - 9:27 | by admin |

This example shows how to perform calculations on hours. It is useful for those who need to know how much time elapsed between a start time and end time. It is not enough to make the subtraction of the end time for the start time, because if the end time moving from one day to the next accounts will no longer correct, for example:

Start Time: 23:00:00

End Time: 02:00:00

End Time - Start Time = 02:00:00 to 23:00:00 = -21:00:00

Obviously it is not so simple to work with time, because then instead of having three hours to correct result would wrongly -21 hours.

To get around this period that goes from day to day we have to check first if the end time is greater than the start time, whichever is greater then the calculation is: End Time - Start Time.

If you are under then we have to do the calculation another way, namely:

Start Time: 23:00:00

End Time: 02:00:00

Total Time: 23:59:59

Hit: 00:00:01

Basically what we do is add to the value of 24:00:00 subtraction to give us the correct three hours. That is:

End Time - Start Time + Total Hours + Hit = 02:00:00 to 23:00:00 + 23:59:59 + 00:00:01 = 24:00:00 = 03 + -21:00:00 : 00:00

Download: Calculus with Time

Related Posts

  • Point
  • Tables
  • RSS feed | Trackback URI

    21 Comments »

    Comment by John Cabrita
    2008-03-04 16:28:44

    I've got a problem, I need to create a database to control inputs and outputs of staff.
    The idea would be to have a place where time to put my input and output of the worker x, knowing at the end of this month if the hours worked or had worked more.

    Did I can ajudaar?

    Comment by Administrator
    2008-03-05 23:44:17

    It is very difficult to do. Just make a table of employee data, time input and output time. After failure to know the work schedule and what time to almoço.Depois just do the calculations as it has in this example. If you can give me more information about the missing data I will make an example to demonstrate.

    Comment by Gelson Teodoro
    2010-05-22 18:56:51

    Hello!

    For example ESSSE Could Send me.

    gelsonteodoro@bol.com.br

    Thank you

    Comment by Administrator
    2008-03-07 20:00:23

    I've made a small example to make sure that is what you want. I have not had time to develop more. Anyway check the example.

    Sample Point

    Comment by evandro
    2009-12-10 05:20:13

    Qro a simple table of overtime

    Comment by Edivaldo
    2008-06-26 18:48:15

    I wonder if an employee who had a foul during the week, working Monday to Friday
    the discount DSR would be 2 days (Saturday and Sunday)
    Faults or RSD = 01 03 = 02 = Total
    Sincerely,

    Comment by Administrator
    2008-06-26 20:50:47

    I apologize but I do not understand what your question!

    Comment by CARLOS ALBERTO
    2009-02-06 16:10:47

    NEED ESTIMATE SECONDS AND MINUTES TO ACCOUNT TELEFONICA COLLATE.

    Comment by Regina
    2009-04-16 17:05:11

    PLEASE HELP ME!
    The EMPLOYEE OF THAT WORKS 07:00 to 15:00, WITHOUT BREAK is the workload of 44 MENSAL.A EXTRA TIME TO PAY is 1H: 40M. HE IS A DOOR
    am right

    Comment by Tony
    2009-09-07 02:42:17

    Friends,

    I am creating a bank to a friend, but I'm kind of inexperienced and am having a little trouble!

    Now I'm trying to do a query time interval and age;
    Example:

    Have a search intervado 1 hour: 10:00:00 to 10:59:59 to, ie, an interval of 1 hour
    I tried two ways: # # 10:00:00 to 10:59:59 # # and # 10: **: ** #
    However it did not work.

    It also has age interval:
    Example:

    18-29 years ... how to get this range:

    Can someone help us!

    TONY : (

    Comment by Joaquim Songs
    2009-11-29 12:56:22

    Hello all

    I am a carpenter
    but I love the access and all that relates to informatics (Although not understand any of this)

    With the example of Calculus with hours'm trying to make a database to record the hours do I acada client.
    But I needed your help to calculate the value in euros of those hours worked.
    If someone could help would appreciate.
    Thank you

    Comment by ROBSON
    2009-12-23 17:30:43

    Hello friends
    I created a aplicativop control cards in access, we use a kind of "coreios" here in the company that controls amount of letters sent and received, which I can not do is calculate the amount of letters sent by a particular person in the current month, eg the register a new sending letters JOAO +1 is added in the field CartaSocial I need is to display the amount in the form of letters elnviadas by him in this month:
    I used the DSum function, but it returns me all and need to return only the current month.
    = DSum ("[CalculoQtdadeCartasMes]", "TabelaCadastroCensura_Saida" "[records] =" & [chart])

    thank you

    att
    Robson

    Comment by day
    2010-04-26 18:57:48

    how to account for time zones : (

    Comment by Mario Celso
    2011-01-28 13:55:39

    Good! I understood your explanation for a single value, and when a large number of hours as shown below?
    INPUT OUTPUT meal worked
    6:50 17:00 1:00 9:10
    6:50 17:00 1:00 9:10
    6:50 17:00 1:00 9:10
    6:50 17:00 1:00 9:10
    6:50 17:00 1:00 9:10

    How to form a table by adding the hours worked?
    Hug and thanks!

    Comment by tata marques
    2011-02-25 14:45:02

    I want to learn how to calculate hours of work outputs as a motel clerk and need to know how long the client was in the room

    Comment by Administrator
    2011-02-27 12:13:15

    The example "point", explains how to calculate hours ...

    Comment by evelyze
    2011-03-23 ​​15:33:34

    good afternoon

    I wonder how do I know how much overtime the employee worked, because I only have the monthly value for $. and wanted to know how many hours he has.

    Thank you

    Comment by Ivone
    2011-05-13 01:25:26

    Hello work in hotel 8:20 to 1:00 pm daily lunch break will always go out after my time but they pay off in but still can not faser my calculation of overtime how do I calculate

    Comment by Bruno
    2011-06-28 04:01:24

    Divide the total amount paid to him in the amount of extra overtime. Ex: each extra hour costing $ 8.00 you paid R $ 128.00 in overtime to the employee. Then 128/8 = 16 hours of overtime worked.

    Comment by adelaide Maichaki
    2011-07-02 00:11:48

    Hello 44hs work week, my schedule
    is 7:30 to 12:00 and 13:00 to 17:18
    in verdadfe would 8am and 48 min is correct
    and have to work a day 9am THANK YOU

    Comment by Adriana
    2012-02-23 18:33:49

    I wonder how do I make overtime hours unpretentious!

    Name (required)
    Email (required - not published)
    Website
    Your comment ( Decrease | Increase )
    You can use <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <b> <cite> <code> <del datetime=""> <em> <i> <Q cite=""> <strike> <strong> in the comments.

    Presentation

    Avatar

    Thank you for visiting.
    Subscribe to feed not to miss any messages.

    Here in blog I will provide examples of working with Microsoft Access and also ask questions to those who ask. More

    Want to subscribe?

    Subscribe or subscribe by email:
    Enter your email:


    Ads