title: In SQL I would like to subtract a date from a previous row date
body: <p>The problem is that the dates are stored in the SQL database as <code>nvarchar()</code> and the times are stored in a separate column. I only have read access to this database, so I can't change the format. Besides, it would probably void our support if the manufacturer found out.</p>
  
  <p>As I see I need to first combine the dates and times into one cell as a datetime and then subtract the previous row from the current.</p>
  
  <pre><code>ActualTime, ActualDate
  5:30:26,    31-Dec-09
  16:01:47,   31-Dec-09
  17:35:50,   31-Dec-09
  18:31:31,   31-Dec-09
  18:51:03,   31-Dec-09
  18:55:35,   31-Dec-09
  19:26:53,   31-Dec-09
   5:25:37,   1-Jan-10
  5:38:36,    1-Jan-10
  5:46:58,    1-Jan-10
  6:27:00,    1-Jan-10
  </code></pre>
  
  <p>Several people have asked what language I was using. I was hoping to do all of this at the server. On the code side (C#) it's a trivial problem.
  Like I said I am looking for an SQL Server server-side solution.</p>