title: PDO datetime format for MSSQL/dblib
body: <p>MSSQL 2005 database has collation "German_Phonebook_BIN" (but that's not important). Connection to db is done via PDO and FreeTDS (using PHP under Debian Squeeze). When I try to select datetime values from a table I get results like:</p>
  
  <p>Apr  1 2008 12:00:00:000</p>
  
  <p>But I expect to get</p>
  
  <p>2008-01-01 00:00:00</p>
  
  <p>(Regard, that the time 00:00:00 is transformed into 12:00:00, don't know why 00:00=12:00???)
  There is no way for me to manipulate the <code>SELECT</code> statements (for doing a conversion with <code>CONVERT</code>). I found no option in PDO for setting a date format. <code>SET DATEFORMAT</code> and <code>SET LANGUAGE</code> before the query runs doesn't also affect this.
  Can anyone give a hint where this can be done (and only be done) in PDO? (Btw. PEAR::MBD2 returns datetime columns in the expected format, but MDB2 is horrible when it has to work with UTF-8 and MSSQL)</p>
  
  <p>OK, some more information (shows only important snippets):</p>
  
  <pre><code>&lt;?php
  $this-&gt;_dsn = 'dblib:host=' . $this-&gt;_db['host'] . ';dbname=' . $this-&gt;_db['database'] . ';charset=UTF-8';
  $this-&gt;_handle = new PDO($this-&gt;_dsn, $this-&gt;_db['user'], $this-&gt;_db['password']);
  print_r($this-&gt;_handle-&gt;query("SELECT [date_column] FROM [some_table]"));
  </code></pre>