# Where could the error be in my time calculation formula?

Options
âœ­âœ­
edited 10/06/22

Hello, I made a timesheet and wage calculation table.

The data is sent by employees using a form.

I have a problem with the time calculation.ðŸ™„

Here is the sheet.

Below is what I don't understand and I don't know where the error is.

I would be grateful if someone could check it. Thanks!

• âœ­âœ­âœ­âœ­âœ­
Options

Where is the end time? I only see start times. Do they always work 8 hours a day or does it vary?

• âœ­âœ­
edited 10/06/22
Options

Sorry, but I messed up the example in my previous post. It shows the end time incorrectly. Below is the corrected one.

Not just 8 hours a day. In fact, there are cases where they work from 8:00 p.m. to 4:00 a.m.

• âœ­âœ­âœ­âœ­âœ­
edited 10/06/22
Options

Does this work as a simpler solution?

=([end date] - [start date]) * 24 + (VALUE(LEFT([end time], FIND(":", [end time]) - 1)) - VALUE(LEFT([start time], FIND(":", [start time]) - 1)))

• âœ­âœ­âœ­âœ­âœ­
Options

That would be for the segedosziop column

• âœ­âœ­
Options

Thank you very much for your help, but I typed it in and the result is not good.

The result is -8 hours.

• âœ­âœ­âœ­âœ­âœ­
Options

It's supposed to be 24 +

• âœ­âœ­âœ­âœ­âœ­
edited 10/06/22
Options

Change that to +

• âœ­âœ­
Options

It works for one day, but the results are bad the next few days.

• âœ­âœ­âœ­âœ­âœ­
Options

Those are the correct results though right?

• âœ­âœ­âœ­âœ­âœ­
Options

If you work 8 am today and continue working until 4 pm the next day thatâ€™s 32 hours.

• âœ­âœ­
Options

Yes, you are right. It should work for me if the user worked from 8:00 a.m. to 4:00 p.m. on October 3rd and 4th.

• âœ­âœ­âœ­âœ­âœ­
Options

So it looks like your original formula worked just fine. Your original formula gave you 32 hours which is correct.

Are you still thinking it's not correct?

• âœ­âœ­
Options

you're right. However, my problem is that;

The worker writes in the form that he worked from 8 a.m. to 4 p.m. every day from October 3rd to 4th. The result should therefore be 2x8, i.e. 16h.

Sorry for my bad English! Maybe I can't articulate my problem well.

• âœ­âœ­âœ­âœ­âœ­
Options

That should look like this :

Start date: 10-3-22, Start Time: 8:00

End date 10-3-22, End Time 16:00

Then the next day they would do

Start date: 10-4-22, Start Time: 8:00

End date 10-4-22, End Time 16:00

• âœ­âœ­
Options

yes, that's what I came up with. I thought there was some trick that also takes shifts into account.

Thank you very much for the help!! I'm thankful!ðŸ™‚

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!