Calculate total hours in tables

  • Profile Image
    Asked on November 02, 2021 at 09:13 AM

    On the link you'll see 2 tabs (Weekly Timesheet & Employee Directory) - I am currently referring to the Weekly Timesheet tab.

    So, I need assistance in the Total Hours column:


    This column will calculate the total hours worked Monday to Sunday (we usually only work Monday to Friday, but we sometimes work on weekends when things need to get done). Currently this column only counts the hours and not the hours and minutes.

    Also, how can I make the form to be able to take more than one draft? I have seen this is also an issue, because my co-worker was busy with her form and I tried to fill in a form as well, but it wanted me to either submit or discard the current draft.
  • Profile Image
    Answered on November 02, 2021 at 09:20 AM

    Kindly allow me some time to check your tables. I will be back shortly.

  • Profile Image
    Answered on November 02, 2021 at 09:46 AM

    Thanks for patiently waiting. Looks like the table can't calculate the hours + minutes through the formula. I suggest calculating the total in the form itself. Take a look at this form:


    Would it work for you? I got the total by adding the time fields in the widget.


  • Profile Image
    Answered on November 03, 2021 at 01:56 PM

    Thank you so much. I will test this with the current form that I built - I also want to see how it reacts with empty timeslots. If it makes sense haha.

    I will be giving feedback on this matter soon :)

  • Profile Image
    Answered on November 05, 2021 at 02:19 PM

    Okay, so I tested it out. I do have the following questions:

    1. The fields, how did you get the until in between the two entries?
    2. How does the calculation work, exactly? Even if you add "Monday In + Monday Out" it technically doubles everything. No matter how we work it out, it does not add up. I want to calculate the weekly hours (40 hours per week, excluding lunch hours).

    See screenshot/s of entered hours and calculated hours.




  • Profile Image
    Answered on November 05, 2021 at 04:49 PM
    1. You can enable the Time Range option on the Time field, here is where to find it:

    2. If you use the time range option the calculation will already count the hours between the time range, here is a clear example:

      As you can see the first time field will return the number of hours between both hours. So in other words you will need to modify your form and instead of using two time fields you should use only one.

    I would recommend to kindly modify your form according to the example and give it a try, let us know if you have any questions.

  • Profile Image
    Answered on November 07, 2021 at 03:52 AM

    Hi Kevin,

    Thank you so much for your response. I did the changes mentioned above, but here is my problem:

    So, I entered my hours for Monday to Friday but it still calculates almost 2 hours ahead. In the calculation field I subtracted 5, because it will be basically an hour lunch everyday from Monday to Friday - does it make sense?

    So, my total hours for this week should be 37h 34m but Jotform calculates it as 39h 45m. How do I correct this? Unless there is something I am missing? Does it use the Decimal System Lawyers use?




  • Profile Image
    Answered on November 07, 2021 at 05:48 AM


    I've checked your form and found no issues with the calculations and it's set properly, in fact I recalculated your inputs as in the screenshot and found the total is 39h 27m which is 39.45 when converted to decimal number.

    1636281492_6187ac9460350_7.pngPlease let us know if you need further assistance we are happy to help.

  • Profile Image
    Answered on November 07, 2021 at 05:59 AM

    Thank you. I think this Decimal system is screwing with my head this week, it has been one of those weeks haha.

    I thank you so much for your effort and assistance, everyone who assisted :)

  • Profile Image
    Answered on November 15, 2021 at 07:05 AM

    I've been following this thread, however, the Time Element you've suggested seems different than what is available for me. In your example, the user inputs the time like a text box, however when I add this element to the form, the only option for the time is a Drop-down for Hour/Min.

    Am I using the wrong Element?

  • Profile Image
    Answered on November 15, 2021 at 08:13 AM

    I checked your form and it seems you haven't enabled TIME yet on your date picker field. Please turn it ON so you input time in a textbox

    1636981927_61925ca74344c_In case I misunderstood your query, kindly share some screenshots for us to see what it looks like from your end.

    Guide: How-to-Post-Screenshots-to-Our-Support-Forum

  • Profile Image
    Answered on November 15, 2021 at 01:38 PM

    Thank you. There was a misunderstanding. The screen shots from the thread above indicate the Time Element is being used, and not the Date Picker Element. However, when I use the Time Element, the only options I see available is the Drop-Down


  • Profile Image
    Answered on November 15, 2021 at 03:29 PM

    Hi there,

    Sorry for the misunderstanding about the element being used.
    You can remove and add the Time Element in your form and see if that will resolve the issue with the drop-down options to select the time. We have cleared your form's caches in case that is causing some issues with the form. If you have still issues with the Time Element and its properties provide us with more details and information so we can further assist you.

    Thank you.