locked
Calculate Time Difference between 2nd and 3rd rows RRS feed

  • Question

  • I have a table log that contains the following rows. For every given log case I have the following logs

    Time                        result in seconds    
    2019-04-01 08:34:00.000     100
    2019-04-01 08:33:00.000     3600
    2019-04-01 08:32:00.000     
    2019-04-01 08:31:00.000    

    Now I need to calculate the difference in time between the second and third rows only every time. Please suggest

    sample data

    id case number System Time Created By Activity Type Time diff sec
    247527899 123 7/23/19 14:30 Agent1 Delay Service Type 0
    247527898 123 7/23/19 14:30 Agent1 AEU_Hold 0
    247527897 123 7/23/19 14:30 Agent1 Update Status 6
    247498253 123 7/23/19 0:00 Phone Field Update 3600
    247498252 123 7/23/19 11:00 Phone Event Occurred 0

    • Edited by LuckySath Wednesday, July 24, 2019 6:31 AM
    Wednesday, July 24, 2019 6:07 AM

Answers