pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Raymond Chui <raymond.chui@noaa.gov>
To: pgsql-jdbc@postgresql.org
To: pgsql-sql@postgresql.org
To: pgsql-bugs@postgresql.org
To: pgadmin-support@postgresql.org.
Subject: Timestamp problem
Date: Tue, 15 Jul 2003 15:15:58 -0400
Message-ID: <3F1452EE.7000509@noaa.gov> (raw)

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





view thread (6+ messages)  latest in thread

Message-ID: <3F1452EE.7000509@noaa.gov>
Permalink:  ../3F1452EE.7000509@noaa.gov/
Also on:    postgresql.org/message-id/3F1452EE.7000509@noaa.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: raymond.chui@noaa.gov, pgsql-jdbc@postgresql.org, pgsql-bugs@postgresql.org, pgadmin-support@postgresql.org.
  Subject: Re: Timestamp problem
  In-Reply-To: <3F1452EE.7000509@noaa.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox