Skip to content
Advertisement

Split time records across midnight

I’m trying to run some reports and having to deal with the whole issue of employee labor hours crossing midnight. It occurs to me though that I could split the records that cross midnight into two records as if the employee clocked out at midnight and simultaneously clocked back in at midnight thus avoiding the midnight problem altogether.

So if I have:

What do you suppose would be the most elegant way to split this record like so:

And yes, I have thoroughly thought through what effects this might have on existing functionality… which is why I’m opting to do this in a temporary table that will not affect existing functionality.

Advertisement

Answer

This might help:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement