Timestamp problem

From: Raymond Chui <raymond(dot)chui(at)noaa(dot)gov>
To: pgsql-jdbc(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org, pgadmin-support(at)postgresql(dot)org(dot)
Subject: Timestamp problem
Date: 2003-07-15 19:15:58
Message-ID: 3F1452EE.7000509@noaa.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-bugs pgsql-jdbc pgsql-sql

I am use PostgreSQL 7.2.1 in Redhat Linux 7.2
Java 1.4.x

When I do JDBC

String sql = "SELECT datetime_column FROM mytable";
....

Timestamp ts = resultSet.getTimestamp(2);

If the timestamp return format like

2003-07-15 13:20:00.20+00

then is OK. But if timestamp return like

2003-07-15 13:20:00.421+00

Then I got SQLException

Bad Timestamp Format at 23 in 2003-07-14 14:45:00.421+00

What is 23?
How do I resolve this problem?

Thank Q!

--
Raymond Chui
NWS at NOAA
301-713-0640 ext 168

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Matej Rizman 2003-07-15 23:34:15 BUG: pgAdmin III View table with empty strings
Previous Message Troels Arvin 2003-07-15 11:59:30 Re: pgadmin III connection dialogue: cannot

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-07-15 19:44:07 Re: [GENERAL] INSTEAD rule bug?
Previous Message Dmitry Tkach 2003-07-15 19:12:05 Re: [GENERAL] INSTEAD rule bug?

Browse pgsql-jdbc by date

  From Date Subject
Next Message Pedro Galan 2003-07-16 08:37:03 Problems with Spanish Chars
Previous Message floyds 2003-07-15 16:13:56 column doesn't get calculated

Browse pgsql-sql by date

  From Date Subject
Next Message Lauren Matheson 2003-07-15 22:13:27 changing an update via rules
Previous Message Michael S. Tibbetts 2003-07-15 19:09:22 min() and NaN