Forum Discussion

admfabiomachado's avatar
6 years ago
Solved

Datetime - seconds

Is it possible to create a new column with a calculation that takes calldate - info2 (call time in seconds)? calldate is the closing time and info2 is the calling time. I need to identify the start of the call.

  • If your call end time is a DateTime column and the duration in seconds is a number column, you can use this formula in a custom column in M/query.  Just add a custom column and use this formula.

     

    =[CallEnd]-#duration(0,0,0,[info2])

     

    If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat

  • Hi, mahoneypat ,

    Tks!! The formula didn't work. I tried to convert the info2 column to an number, but it still didn't work. See the pictures:

     

4 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    If your call end time is a DateTime column and the duration in seconds is a number column, you can use this formula in a custom column in M/query.  Just add a custom column and use this formula.

     

    =[CallEnd]-#duration(0,0,0,[info2])

     

    If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat

    • admfabiomachado's avatar
      admfabiomachado
      Helper I

      Hi, mahoneypat ,

      Tks!! The formula didn't work. I tried to convert the info2 column to an number, but it still didn't work. See the pictures:

       

      • mahoneypat's avatar
        mahoneypat
        Microsoft Employee

        Glad you got it working.  What was causing the error?

         

        If that approach worked, please mark it as solution.  Kudos are appreciated too.

        Regards,

        Pat