Skip to main content

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

Hi @Kristoffer 

You would need to make it have more rows than exists.

Look at this guide for reference.

https://legacysupport.timextender.com/hc/en-us/articles/115005972746-Improve-execution-times-by-splitting-exchange-rates-out-on-dates#the-exchange-rate-table-contains-both-start-and-stop-date

In essence you need to use the date table to add more dates than is existing and then fill out the dates with 7,5 hours if necessary.


Also this seems really similar to the other question. In any case the solution is the same as were suggested in that.


Reply