title: How to decode time stored as integer in SQL Server database
body: <p>I got some dump of SQL Server database to extract some data out of it. In particular I have to extract start and end datetime of appointments. I managed to identify date column which stores values like 41640, 41641 and so on.
  Casting those values into date time (<code>cast (41640) as datetime)</code>) gives nice date with no time (<code>2014-01-03 00:00:00</code>).</p>
  <p>Next there are two columns which I suspect (based on their names: from, to) represent start and end time. The problem is that values in those two columns are either NULLs or integers in the range from 29 to 82. Looking for any hints how to convert those values into time of the day (these should be pretty much even times).</p>
  <p>Here are some sample values:</p>
  <pre><code>date, from, to
  41640   29  68
  41640   29  68
  41640   29  68
  41640   29  68
  41640   29  68
  41641   29  68
  41641   29  68
  41641   29  31
  41641   29  30
  41641   41  41
  </code></pre>