Forum Discussion
Return datetime value based on value in another column
- 4 years ago
Hi macmy034 ,
Is this what you want?
Calculated StartTime = [Shift Start Time]+#duration(0, 0, 0,[StartCalc])Calculated EndTime = [Shift End Time]-#duration(0, 0, 0,[EndCalc])Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sorry guys; I figured it may be easier if I simplified it but I think that made it more complicated haha.
ShiftIndex is Date + 1 for D/S / 2 for N/S
Duration is time a person was in this status
SAP_ID is the Person
StartCalc is Shift Start time minus StartTime (time from shift start time in seconds)
EndCalc is the same, but minus Shift End time.
I need to find the status start time that is closest to the shift start time (smallest amount of start calc) then I need to find the end time closest to the shift end time (Smallest amount of endcalc)
Also: Since taking this screenshot i've found the cause of the duplicates and removed it too 🙂
Hi macmy034 ,
Is this what you want?
Calculated StartTime = [Shift Start Time]+#duration(0, 0, 0,[StartCalc])Calculated EndTime = [Shift End Time]-#duration(0, 0, 0,[EndCalc])
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.