From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Scott Ferrett <scott@ferrettconsulting.com>
To: pgsql-odbc@postgresql.org
Subject: Re: Obtaining hundredths of a second data from time data types
Date: Fri, 4 Mar 2016 14:03:37 -0800
Message-ID: <56DA0639.8050006@aklaver.com> (raw)
In-Reply-To: <56D9FC10.50107@ferrettconsulting.com>
References: <56D92DAB.9010806@ferrettconsulting.com>
<56D9D1C1.4060506@aklaver.com>
<56D9FC10.50107@ferrettconsulting.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: adrian.klaver@aklaver.com, scott@ferrettconsulting.com
Subject: Re: Obtaining hundredths of a second data from time data types
In-Reply-To: <56DA0639.8050006@aklaver.com>
References: <56D92DAB.9010806@ferrettconsulting.com> <56D9D1C1.4060506@aklaver.com> <56D9FC10.50107@ferrettconsulting.com> <56DA0639.8050006@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox