Bug #29255 Problems on time fields
Submitted: 21 Jun 2007 1:29 Modified: 21 Jun 2007 13:01
Reporter: André Lopes
Status: Duplicate
Category:Connector/ODBC Severity:S1 (Critical)
Version:3.51.16 OS:Any
Assigned to: Target Version:
Tags: ODBC, fields, time, date

[21 Jun 2007 1:29] André Lopes
Description:
exactly like Bug #25846

time fields are returning date / time values on a odbc connection

How to repeat:
i saw that when i tryed to sum time fields on excel with data retrivied with myodbc.

so to reproduce add an external data source with myodbc, select a few values. 

in the cell instead to have hour:minute:second you will get day/month/year -
hour:minute:second
[21 Jun 2007 13:01] Miguel Solorzano
Thank you for the bug report. Duplicate of bug:http://bugs.mysql.com/bug.php?id=25846.

I will ask to my co-worker to reverify the above bug again.
[19 Dec 2007 15:26] Bogdan Degtyariov
Checked the bug with MyODBC 3.51.22. Works as expected.
The problem with Excel is that the bounding buffer for DATE and TIME columns is TIMESTAMP
(SQL_C_TYPE_TIMESTAMP time identifier) instead of DATE or TIME (SQL_C_TYPE_DATE or
SQL_C_TYPE_TIME). If fill the buffer from the TIME column the TIMESTAMP variable will
contain the following information "0000-00-00 HH:MM:SS". As ero dates are not allowed the
date component is set to the current date. See the [c] section which corresponds to the
case when time column is bound to TIMESTAMP buffer:

http://msdn2.microsoft.com/en-us/library/ms712436(VS.85).aspx

DATE result bound to TIMESTAMP result is ok. Time component can be 00:00:00 accordingly
to MSDN specification:

http://msdn2.microsoft.com/en-us/library/ms712474(VS.85).aspx

This behavior will not be changed because it fully corresponds to the specification.