title: Convert Milliseconds to Hours, minutes and seconds
body: <p>Yes I know there are others who have asked the same question but their solution won't work in this case.</p>
  
  <p>Here is my problem.</p>
  
  <p>I'm summing a verly large number of integers. In fact so many that the SUM function won't work.</p>
  
  <p>So I do this:</p>
  
  <blockquote>
    <p>Sum(cast(LotsofIntegers as decimal))  which gives me 3472201304</p>
  </blockquote>
  
  <p>I want to view this in hh:mm:ss.  The problem is that the Dateadd function won't accept such a large number.  otherwise I could just do this</p>
  
  <blockquote>
    <p>CONVERT(VARCHAR,DATEADD(ms,Sum(cast(LotsofIntegers as
    decimal)),0),114)</p>
  </blockquote>
  
  <p>which is the common solution.   </p>
  
  <p>I'd rather not have to do this the very hard way with a whole bunch of divisions. </p>
  
  <p>Can anyone assist?</p>