Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 4863A2E0259 for ; Tue, 12 Feb 2008 08:03:16 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 76278-01 for ; Tue, 12 Feb 2008 08:02:52 -0400 (AST) Received: from mail.transas.com (mail.transas.com [82.140.75.150]) by postgresql.org (Postfix) with ESMTP id 4CABD2E0266 for ; Tue, 12 Feb 2008 08:03:06 -0400 (AST) Received: from sol.transas.com (sol.transas.com [10.10.0.20]) by mail.transas.com (Postfix) with ESMTP id 82E194E9A39 for ; Tue, 12 Feb 2008 15:02:41 +0300 (MSK) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C86D6F.2B040460" X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: timestamp as varchar(23) Date: Tue, 12 Feb 2008 15:02:41 +0300 Message-ID: <528853D3C5ED2C4AA8990B504BA7FB850106DEFA@sol.transas.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: timestamp as varchar(23) Thread-Index: AchtbysjtKpeQ8COSCCVdFK0C4ZPVQ== From: "Zubkovsky, Sergey" To: X-Transas-MailScanner: Found to be clean X-Transas-MailScanner-From: sergey.zubkovsky@transas.com X-Transas-MailScanner-To: pgsql-docs@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/15 X-Sequence-Number: 4809 This is a multi-part message in MIME format. ------_=_NextPart_001_01C86D6F.2B040460 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, =20 I'm trying to get some "timestamp without time zone" column's value as a varchar(23) value. The SQLBindCol() function is used for this purpose in my C++ app. However the result string doesn't contain milliseconds part at all while the real column's value contains it ('2007-12-23 10:00:01.123' for example).=20 After SQLFetch() the result's buffer contains '2007-12-23 10:00:01' only. The same program works fine with a MSSQLServer database so I cannot suppose that there is something wrong in my app. =20 OS: WinXP SP2 "PostgreSQL 8.3.0, compiled by Visual C++ build 1400" ODBC Driver: PostgreSQL Unicode 08.03.01.00 Additional connection string settings: ByteaAsLongVarbinary=3D1; TextAsLongVarchar=3D1; = MaxVarcharSize=3D8000; BoolsAsChar=3D0; BI=3D-5; LFConversion=3D0; LowerCaseIdentifier=3D0; =20 How can I get "milliseconds part" in this case? =20 Thank you. =20 =20 =20 ------_=_NextPart_001_01C86D6F.2B040460 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I’m trying to get some = “timestamp without time zone” column’s value as a varchar(23) = value.

The SQLBindCol() function is used for this = purpose in my C++ app.

However the result string doesn’t = contain milliseconds part at all while the real column’s value contains it ('2007-12-23 10:00:01.123' for example).

After SQLFetch() the result’s buffer = contains '2007-12-23 10:00:01’ only.

The same program works fine with a = MSSQLServer database so I cannot suppose that there is something wrong in my = app.

 

OS: WinXP SP2

"PostgreSQL 8.3.0, compiled by Visual = C++ build 1400"

ODBC Driver: PostgreSQL Unicode = 08.03.01.00

Additional connection string = settings:

    ByteaAsLongVarbinary=3D1; TextAsLongVarchar=3D1; MaxVarcharSize=3D8000; BoolsAsChar=3D0; BI=3D-5; LFConversion=3D0; = LowerCaseIdentifier=3D0;<= /p>

 

How can I get “milliseconds = part” in this case?

 

Thank you.

 

 

 

------_=_NextPart_001_01C86D6F.2B040460--