Help

Re: Night Shift Calc

1326 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Miroslav_Tunjic
6 - Interface Innovator
6 - Interface Innovator

dear all

this is (should be) so simple, but yet cant get it to work

New Law regulations in Austria (01.01.2019) :confused:
Gig worker MUST be calculated per day
If someone workes the nightshift this woud have to be divided onto the 2 days, according to the worked hours, this all per month, of course

If “Max” workes on 12.02 18:00 - 13.02 04:00 what would be the solution to this calculation?
how many hours “Max” worked on 12.02 and how many on 13.02.?

hier is a link to a test base, if any one wants to play with calc und formulas, i have found no solution. yet.

BR
:m:

4 Replies 4

Had a quick play on the side in a copy of your base, then copied my changes into the one you shared.

First step is to figure out how many hours were worked between the {IN} time and midnight, so I made a field that took the {OUT} date and forced it to midnight (00:00 in 24 hour time). Then it was just a matter of doing a DATETIME_DIFF between {IN} and that new field to see how many hours were worked prior to midnight, and the next field subtracts that from the total you already calculated (which I tweaked to force the difference to hours, so that no math was needed; your original was missing a time specifier, which left the difference at the default setting of seconds)

i just wanted to say a big thank you!!

incredible how one can get lost in complicating the simplest stuff!

Anyway, if i may ask what would be the recommended tweak to make this work on Day AND Night shift calc AND with breaks?

PS: DB above ist intended to play with

I’m tied up with other things, but I’ll play with this a little later today and get back to you.

I figured it was, but the way you shared it added me as a collaborator. If anyone else also used that link they’d also become collaborators on the same data, meaning that we’d potentially be working on the same data at the same time. There’s another way to share a base that allows other users to copy the full base, rather than operating on the original you made:

  • Open the sharing dialog for the base
  • Click “Create a shared link to the whole base”
  • Click “Private read-only link”

Sorry that I didn’t reply sooner. Unfortunately I’ve got too much going on right now, and don’t have time to dive into the details of the more advanced solution you’re seeking. If someone else can jump in and help, that would be much appreciated!