Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Calculate time difference across dates and users

Hey guys, I'm hoping you can assist two desperate bachelor thesis authors! We have a dataset with sales orders, a date when order was packed and a worker who packed specific sales order. We are in...
  • Anonymous's avatar
    Anonymous
    3 years ago

    First sort by name, and then by date. Add two index columns, one starting at zero and one starting at one, then left outer join the table to itself on index equals index one. Then change your text date time to an actual date time value, and then just do the row math, specifying that if Name <> Name.1 then 0 else DateTime-DateTime.2

     

    --Nate

     

    --Nate