Forum Discussion

Bladua's avatar
Bladua
Regular Visitor
2 years ago
Solved

Time between leave entries

Hi All,

 

I'm struggling with this one. I have data of part day leave entered by drivers. I'm trying to calculate availability based on leave entered. For the most part it works fine, but one of the requirements is that if one leave entry starts less than 4 hours after another one finishes then that driver is considered unavailable from the beginning of the first entry to the end of the second entry. (see example data below of 2 entries that fall into that situation.

 

DateDriver_CodeLeave_StartLeave_EndNumber_of_Days
27/01/2023100227/01/2023 7:0027/01/2023 12:001
27/01/2023100227/01/2023 14:0027/01/2023 19:001
29/01/2023100329/01/2023 15:3029/01/2023 19:301
29/01/2023100229/01/2023 3:3029/01/2023 13:301
30/01/2023100330/01/2023 21:301/02/2023 6:002

 

 

Regards, Duane

  • I'm thinking something like a calulated column that checks for start times for that driver between 0 and 4 hours after this end time and if it finds one then the new column would be NEW_END_TIME is the found start time otherwise it would be the original end time.

1 Reply

  • Bladua's avatar
    Bladua
    Regular Visitor

    I'm thinking something like a calulated column that checks for start times for that driver between 0 and 4 hours after this end time and if it finds one then the new column would be NEW_END_TIME is the found start time otherwise it would be the original end time.