title: Converting seconds to MM:HH:SS in Data Studio
body: <p>I am trying to convert seconds to the format: <code>HH::MM:SS</code></p>
  <p>Here is my code:</p>
  <p><code>Session Duration</code> is the metric in seconds, I have derived 3 fields from it as shown below:</p>
  <p>Session_Hours: <code>MOD(Sum(Session Duration),3600)</code>
  Session_Minutes: <code>MOD(Sum(Session Duration) - Session_Hours*3600,60)</code>
  Session_Seconds: <code>Sum(Session_Duration) - Session_Hours*3600 - Session_Minutes*60</code></p>
  <p>But when I try to format it into: <code>hh:mm:ss</code> using:</p>
  <p><code>CONCAT(CAST(Session_Hours as String),CONCAT(&quot;:&quot;,CONCAT(CAST(Session_Minutes as String),CONCAT(&quot;:&quot;,CAST(Session_Seconds as String)))))</code></p>
  <p>It throws me following error:</p>
  <ul>
  <li>Metric expressions and aggregations are not allowed in this expression.</li>
  </ul>
  <p>Does anyone know how to do this or a better way of converting seconds to <code>HH:MM:SS</code></p>