Re: Obtaining hundredths of a second data from time data types
От | Adrian Klaver |
---|---|
Тема | Re: Obtaining hundredths of a second data from time data types |
Дата | |
Msg-id | 56DA0639.8050006@aklaver.com обсуждение исходный текст |
Ответ на | Obtaining hundredths of a second data from time data types (Scott Ferrett <scott@ferrettconsulting.com>) |
Ответы |
Re: Obtaining hundredths of a second data from time data types
|
Список | pgsql-odbc |
On 03/04/2016 01:20 PM, Scott Ferrett wrote: > Here is a screen shot from ODBCTest after Issuing "SELECT ts, t FROM > TestTable" and binding an SQL_C_TYPE_TIMESTAMP to each of the two columns: > > > > As you can see, the timestamp has the hundredths part filled in where as > the time part does not. > > I also tried binding to SQL_C_CHAR as a work-around. But this made no > difference, producing: > > > > This is the result of the same select statement run from pgAdmin III > showing that there the hundredths part is returned for both fields: > > Looks like this is the reason: https://msdn.microsoft.com/en-us/library/ms712436%28v=vs.85%29.aspx The identifier for the time ODBC SQL data type is: SQL_TYPE_TIME to SQL_C_TYPE_TIMESTAMP None[b] Data[c] 16[d] [c] The date fields of the timestamp structure are set to the current date, and the fractional seconds field of the timestamp structure is set to zero. > > > Cheers, > Scott > -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-odbc по дате отправления: