pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: Timestamp vs. Java Date/Timestamp
Date: Tue, 05 Feb 2013 16:07:09 +0100
Message-ID: <ker759$b4a$1@ger.gmane.org> (raw)
In-Reply-To: <1360043227.14635.9.camel@localhost>
References: <1360043227.14635.9.camel@localhost>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Andreas Reichel, 05.02.2013 06:47:
> Dear List,
>
> the last day I had a hard time figuring out how to hand over timestamps
> using prepared statements.
>
> What is the correct way to hand over a Java Date parameter (avoiding the
> double String manipulation)?

Pass an instance of java.sql.Timestamp using the setTimestamp() method.






-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (13+ messages)  latest in thread

Message-ID: <ker759$b4a$1@ger.gmane.org>
Permalink:  ../ker759$b4a$1@ger.gmane.org/
Also on:    postgresql.org/message-id/ker759$b4a$1@ger.gmane.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: spam_eater@gmx.net
  Subject: Re: Timestamp vs. Java Date/Timestamp
  In-Reply-To: <ker759$b4a$1@ger.gmane.org>
  References: <1360043227.14635.9.camel@localhost> <ker759$b4a$1@ger.gmane.org>

* 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