-
anniepriceAsked on December 4, 2020 at 5:39 AM
Hi there, please can you help me create a monthly timesheet for my staff that calculates the total hours each day along with a running total at the end of the month.
I am attaching my excel form that I created but I really need an online version as a lot of my staff dont have access to excel.
Thanks In Advance
Annie Price
-
Richie JotForm SupportReplied on December 4, 2020 at 7:02 AM
It is possible to create a timesheet form.
You can add a time field
and use the form calculation widget to calculate the total hours work.
https://www.jotform.com/help/259-how-to-perform-form-calculation-using-a-widget
Example calculation.
Sample Form:https://form.jotform.com/203382751319051
Please check it out and let us know if this fits your requirements.
-
anniepriceReplied on December 4, 2020 at 7:48 AM
Hi, many thanks for this but the total amount is not accurate, I think its working it out as a percentage of time as opposed to total hours.
Thanks
Annie Price
-
Sonnyfer JotForm SupportReplied on December 4, 2020 at 8:27 AM
Hello Annie - Did you mean the total hours are not accurate? I did test the demo form of my colleague @Richie_P and it seemed to work fine. The total hours are calculating correctly as I change the end time.
Could you please check again? If you're expecting a different result, kindly share some more information we can point you in the right direction.
-
anniepriceReplied on December 4, 2020 at 8:31 AM
Hi I have attached what happens on mine, thank you.
-
Jessica JotForm SupportReplied on December 4, 2020 at 9:30 AM
Hi Annie, thank you for clarifying it to us.
To calculate hour and minute differences, you will need to have four Form Calculation.
- Hour differences
- Total minutes
- Minutes differences
- Total hour and minutes
Please kindly refer to the following demo: 203383357278967. Please give it a try too. If it's suitable, please kindly follow the steps below:
Hour differences
To calculate hour differences, we simply need to use the formula: floor(EndTime - StartTime).
Total minutes
To calculate minute differences, we will need to know the total minutes. We can calculate total minutes by using the formula: (EndTime - StartTime)*60.
Minutes differences
After calculating the total minutes, we can calculate the minute differences. We can simply use the formula: (HourDifferences* 60 - TotalMinutes)*(-1).
Total hour and minutes
After calculating minutes differences, we can add them side by side. To do this, we simply need to use the formula HourDifferences : MinutesDifferences.
The form calculation of hour differences, total minutes, and minutes differences can be hidden from the form. So only the form creator will be able to see it in build.
You may also clone the form by following our guide here: How to Clone an Existing Form from a URL.
Let us know if it doesn't work for you.
Related guide:
How to Perform Form Calculation Using a Widget
Form Calculation - Math Function Reference -
anniepriceReplied on December 4, 2020 at 10:57 AM
Hi, thank you so much for this, I have tried this on my computer and it works well but on my phone it does not.
Please see attached screenshot.
Thanks
Annie Price
-
Ashwin JotForm SupportReplied on December 4, 2020 at 12:02 PM
I did test your form and I see the issue you are having. It seems the calculation is not refreshed until the AM/PM is selected again in mobile device.
I would suggest you to please test the following form in your mobile device and see if it displays the calculation correctly: https://form.jotform.com/203384855339969
Do get back to us if the issue persists.
We will wait for your response.
-
sgtwijanarko23Replied on December 4, 2020 at 2:36 PM
Hi Annie,
As a fellow JotForm user, I am also interested in this timesheet, someday I might need it. My approach would be using:
1) Single Choice from Basic Form Element: Time Range and Duration Indicator,
2) Form Calculation, the problem when adding duration from Time Range element it doesn't calculate correctly, that's why I use hidden text elements to abstract hours, minutes need conversion and join them back.
It can calculate more than one date, in this form I made it to calculate two dates.
3) Form Designer to position date and time so they're inline.
4) Condition - Form Setting.
I haven't figured out how to create a button for the user to calculate the time, currently using the radio button.
https://form.jotform.com/203384630162045
Anyway, I hope it helps.
Sigit W.
-
anniepriceReplied on December 5, 2020 at 6:14 AM
Hi, thank you so much for this.
My only problem is that I need 31 start time and end time fields so that my staff can complete one for each day of each month and then one for breaks each day with start time and end time.
I have looked at your guidance above but its just too much for me !!
Thanks
Annie
-
Patrick_RReplied on December 5, 2020 at 9:39 AM
Hi! Please allow me some time to look into this. I'll get back to you soon with an update.
Thank you!
-
Patrick_RReplied on December 5, 2020 at 9:52 AM
Hello!
- My only problem is that I need 31 start time and end time fields so that my staff can complete one for each day of each month
In that case, you'll need to copy/paste fields and formulas 31 times so that your staff members can provide the values 31 times.
Following is a simple example on how you can do this: https://drive.google.com/file/d/1YxEOc3aScgVwN6EBiJNTu9Y-3jtlnnuM/view?usp=sharing
This is the form prepared in this example: https://www.jotform.com/203393675878977
- and then one for breaks each day with start time and end time.
For including lunch breaks in your worksheets as well, you'll need to make some changes to your form.
Please check this form: https://form.jotform.com/203393591005956
I modified my colleague @Ashwin's form to include break times in it. The calculation now considers break times as well.
If this solves your purpose, then you can clone this form into your own account and start using it by adding 31 fields to it, don't forget to copy/paste formulas as well (like demonstrated in the above screencast).
I hope this information helps. for any further queries, feel free to write back to us.
Thank you!