JDBC problem on Postgresql 7 beta 5

From: "Jack Zhu" <jzhu(at)netcom-sys(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: JDBC problem on Postgresql 7 beta 5
Date: 2000-05-02 21:53:41
Message-ID: NDBBJFPPMJIBCJDIGANMMEMJCAAA.jzhu@netcom-sys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

PostgreSQL 7 Beta 5 on Red hat Linux 6.0
JDBC 6.5-1.1 driver, Java 1.1.7B, download JDBC driver from
http://www.retep.org.uk/postgres/

We have a a table which has a column col_a with 'timestamp' data type. When
insert time value to this column, we use format which is 'MM/DD/YYYY
HH24:MI:SS' (such as '05/01/2000 13:20:02'). Insertion is OK.

But when we try to read this column, the output is '05/01/2000
13:20:02.20-04', which is not what we need. We don't need the '.20-04' part
of the output, that is nano second and time zone part, otherwise the output
cannot work with JDBC driver.

Is there any ways make our app work without returning the 'nano and time
zone' part or make JDBC understand the 'timestamp' full output format? Thnx!

Error msg we got from running our app:
"
TAMP = 2000-04-03 00:00:00.0
GETTIME = 954734400000
DATE = Mon Apr 03 00:00:00 EDT 2000
Bad Timestamp Format at 0 in 2000-04-03 12:12:12.12-04
at postgresql.jdbc1.ResultSet.getTimestamp(ResultSet.java:445)
at
com.netcom.netforensics.dbaccess.SQLObjectAccess.getProperty(SQLObjectAccess
.java:709)
"

Jack

Browse pgsql-general by date

  From Date Subject
Next Message Jack Zhu 2000-05-02 21:59:56 Return from timestamp column
Previous Message rmcm 2000-05-02 21:46:49 Re: Finding PrimaryKey columns of a table