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:
Apr 1 2008 12:00:00:000
But I expect to get
(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
$this->_dsn = 'dblib:host=' . $this->_db['host'] . ';dbname=' . $this->_db['database'] . ';charset=UTF-8';
$this->_handle = new PDO($this->_dsn, $this->_db['user'], $this->_db['password']);
print_r($this->_handle->query("SELECT [date_column] FROM [some_table]"));
check the setting in
/etc/freetds/locales.conf or wherever
FREETDSCONF points to - for an example see https://www.centos.org/modules/newbb/viewtopic.php?topic_id=29646.
Another option could be to use
convert in your SQL statement...