1 Reply Latest reply on Mar 16, 2015 2:17 PM by tdanner

    SWQL support for modulo operation

    bluefunelemental

      So we can use something like this:

      select ToString(((i.LastRunDuration % 3600) / 60)) + 'm ' + ToString((@total % 60)) + 's' AS [Duration]

       

      Rather then this:

      ,CASE WHEN (i.LastRunDuration / 60) > 0 THEN (ToString((i.LastRunDuration / 60)) + 'm ' + ToString((i.LastRunDuration -(i.LastRunDuration / 60) * 60)) + 's') ELSE (ToString((i.LastRunDuration -(i.LastRunDuration / 60) * 60)) + 's') END AS [Duration]