I have a table with dates of employees when they start and end work each day. Some days the start of work day is not the same as the end of the work day. Example : employee 2 start work 07-08-2023 end work 09-08-2023. This means that the employee is sick in the period. I have a condition that set this employees work time to 7.5 hours. I have to split up the dates where start_date <> end_date. So that i in the interval can add 7.5 hours to the employee each day he was sick. How can i do this?
This is a screenshot where the dates are different. Sorry about the launge “mekaniker” is the employee and “Antaltimer_Frokost” means being sick
The end result i want is to get 7.5 for each day, so at the first i would like 7.5 + 7.5 . So for the last employee “95012” i want 7.5+7.5+7.5. Hope its clear what i want
Best answer by Thomas LindView original