Forum Discussion

mbrawn's avatar
mbrawn
Frequent Visitor
8 years ago
Solved

Calculating Duration in Minutes & Seconds between 2 Columns

Hi there,   I have 2 columns, both of which are Date/Time (DD/MM/YYYY HH: MM: SS). They are named SessionIDTime and SessionEndTime.   These are from a call report table and I need to be able to u...
  • jthomson's avatar
    8 years ago

    Does DATEDIFF(SessionIDTime, SessionEndTime, second) produce a correct value for the number of seconds of each call? If so that's half the battle, you can then look to get the number of minutes of the call by using something like quotient(newcolumnwejustmade, 60)

     

    edit - and the number of seconds similarly except using mod rather than quotient