Skip site navigation (1) Skip section navigation (2)

timestamp as varchar(23)

From: "Zubkovsky, Sergey" <Sergey(dot)Zubkovsky(at)transas(dot)com>
To: <pgsql-docs(at)postgresql(dot)org>
Subject: timestamp as varchar(23)
Date: 2008-02-12 12:02:41
Message-ID: (view raw or whole thread)
Lists: pgsql-docs


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

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

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



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

ODBC Driver: PostgreSQL Unicode

Additional connection string settings:

    ByteaAsLongVarbinary=1; TextAsLongVarchar=1; MaxVarcharSize=8000;
BoolsAsChar=0; BI=-5; LFConversion=0; LowerCaseIdentifier=0;


How can I get "milliseconds part" in this case?


Thank you.




pgsql-docs by date

Next:From: Bruce MomjianDate: 2008-02-13 22:44:57
Subject: Migration section added
Previous:From: Steve AtkinsDate: 2008-02-11 23:16:40
Subject: Missing docs for "FM" in to_char(numeric) ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group