Forum Discussion

jusTodd's avatar
jusTodd
Advocate IV
2 years ago
Solved

Compare two rows and adjust Date/Time for one based on another

I need to bring two rows of timesheet data together to display the correct dates and times, when and if it happens.   Attempting to display schedules and timesheets (two independent datasets) in a ...
  • jusTodd's avatar
    jusTodd
    2 years ago

    Thanks for the response lbendlin .  The unique ID is in another table, which ultimately joins with EEID in this table.

     

    I did figure out a sort of solution over the week.

     

    1. Get Timesheet Start
    2. Get Timesheet End
    3. Calculate new stuff ...
      1. REG Timesheet End = IF REGWK1, add duration hours to Timesheet Start
      2. OT Timesheet Start = IF OTWK1, subtract hours from Timesheet End
    4. Populate new columns for Actual Timesheet Start/End using a conditional on the originals and the recalculated.
      1. Accounts for any situations where the whole of the shift is OT as well.
    5. Now ... I have actual start and actual end date/times for the timesheets that have more than one row, due to OT.