title: How to get Time difference Between Datetime, Date and Time columns
body: <p>I have table called Data_Details and the data looks like:</p>
  
  <pre><code>DateTimeClosed            Datesub            TimeSub
  6/20/2011 18:00           5/16/2011          17:13:17
  6/20/2011 18:00           5/18/2011          13:45:17
  6/1/2011 19:00            5/24/2011          8:30:12
  </code></pre>
  
  <p>I am trying to get the difference between closed date and sub date in mins.</p>
  
  <p>I wrote something like this:</p>
  
  <pre><code>SELECT  convert(int,convert(Datetime,[DateTimeClosed])-
  (convert(Datetime,[Datesub])+convert(datetime,[TimeSub])))*24*60 
  FROM dbo.Data_details
  </code></pre>
  
  <p>It is giving me following error:</p>
  
  <p>Msg 241, Level 16, State 1, Line 2
  Conversion failed when converting date and/or time from character string.</p>
  
  <p>Can anyone help me?</p>