From: Aleksey Demakov <avd@gcom.ru>
To: pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] Re: ResultSet.getDate
Date: 02 Feb 1999 10:39:20 +0600
Message-ID: <871zk9zafb.fsf@avd.gcom.ru> (raw)
References: <19990201214348.22907.rocketmail@send202.yahoomail.com>
Peter Garner <peter_garner@yahoo.com> writes:
> I am using the JDK 1.1.7v1a from Blackdown. Indeed,
> Java's handling of dates is a little funky. But in
> this case the problem is that the returned strings
> are not being handled properly. Calling getString
> instead of getDate returns :
>
> "Mon Feb 01 16:08:00 1999 UTC"
>
> And the format string used in the SimpleDateFormatter
> object that getDate uses to convert that string is
> not correct for that format. If there is anything I
> can do to help, please let me know! :-)
Perhaps opening your connections as follows might help you
...
// open connection
conn = DriverManager.getConnection (url, usr, pwd);
// set datestyle
Statement st = conn.createStatement ();
st.executeUpdate ("set datestyle='iso'");
st.executeUpdate ("show datestyle");
st.close ();
...
--
Aleksey Demakov
avd@gcom.ru
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-interfaces@postgresql.org
Cc: avd@gcom.ru
Subject: Re: [INTERFACES] Re: ResultSet.getDate
In-Reply-To: <871zk9zafb.fsf@avd.gcom.ru>
* 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