timestamp as varchar(23)

Поиск
Список
Период
Сортировка
От Zubkovsky, Sergey
Тема timestamp as varchar(23)
Дата
Msg-id 528853D3C5ED2C4AA8990B504BA7FB850106DEFB@sol.transas.com
обсуждение исходный текст
Ответы Re: timestamp as varchar(23)  (Hiroshi Inoue <inoue@tpf.co.jp>)
Список pgsql-odbc

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=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-odbc по дате отправления:

Предыдущее
От: Hiroshi Inoue
Дата:
Сообщение: Re: SQLGetDiagRec, sqlstate returned?
Следующее
От: Hiroshi Inoue
Дата:
Сообщение: Re: timestamp as varchar(23)