title: How to split minutes into days, hours and minutes in tsql
body: <p>I have a column which consist of minutes. Is there any simple way to split minutes column into one column which shows days, hours, minutes only?</p>
  
  <pre><code>DURATION              
  -----------
  67           ==&gt; 1 hour, 7 minutes
  1507         ==&gt; 1 day, 1 hour, 7 minutes
  23           ==&gt; 23 minutes
  </code></pre>
  
  <p>I googled for solution but I didn't find any solution similar for me. I want to show this in a report but trying to find how can I solve this column looks meaningfully. Duration column's calculation like this. </p>
  
  <pre><code>avg(datediff(MINUTE, ei.SentDate, eo.SentDate)) over(partition by ei.mailbox) as DURATION   
  </code></pre>