title: How to set the base time for DateTime in IIS (ASP) for compatibility mode?
body: <p>We have updated our servers with Windows 2008 Server, but we are still using SQL Server 2005 in our production software. The problem comes in one part of the system where we store times as datetimes. Since ever, storing a time in a datetime column stored the base date as the date. It is 1900-01-01 in SQL Server 2005. Back then, IIS understand that this is the default case, so our ASP application printed only the time part of the datetime and our system worked as expected.</p>
  
  <p>With this sa[i]d update, the base datetime seems to have changed to 1899-12-30, so our ASP pages display the full datetime, for example 1900-01-01 07:30:00, instead of only the time (07:30:00), as this is not the default date anymore.</p>
  
  <p>I know this isn't the best approach for the system, it wasn't me who developed it in the first place, I'm just maintaining this, so I'd like to know if there is someplace in the IIS configurations menus or in Windows where I can set the base date for my applications. I've read somewhere else that SQL Server 2005 uses 1900-01-01 as basedate where other MS applications use 1899-30-12, but I don't think this is it, I hope I can change this.</p>
  
  <p>I don't know yet the consequences of extracting the time and using it in this part of the system (altering our software) instead of messing around with configurations (input to our software), but I guess the blind spots would be everywhere.</p>
  
  <p>======
  Example, as asked:</p>
  
  <p>I can't supply an exact example right now (I'm home for the weekend), but I can try:</p>
  
  <pre><code>set rs = Server.CreateObject("ADODB.RecordSet")
  rs.Open "SELECT * FROM TABLE WHERE ID=123", MyConnection, 1, 3
  rs("MyDateTimeColumn") = Request.Form("MyTimeOnlyHtmlInput") 'Formatted as 07:14:50, for example
  rs.Update 'Saved to the Data Base
  rs.Close
  rs.Open "SELECT * FROM TABLE WHERE ID=123", MyConnection, 1, 3 'Retrieving data back
  echo "&lt;input type='text' value='" &amp; rs("MyDateTimeColumn") &amp; "' /&gt;"
  </code></pre>
  
  <p>That code used to work, I'd feed "01:23:45" in the input, post it to this code and it would print the input with the time only. Right now, what I get in the input is "1899-12-30 01:23:45.000".</p>
  
  <p>UPDATE:
  I've asked our Server Manager for help, he'll try MSFT as resource. I'll update this if I get news. Thank you all for the help. I'll update this if I get some news.</p>