pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gilberto C Andrade <gilbertoca@secad.to.gov.br>
To: pgsql-jdbc@postgresql.org
Subject: Problem with to_date function
Date: Mon, 22 Aug 2005 16:31:51 -0300
Message-ID: <430A2827.9060907@secad.to.gov.br> (raw)

Hi,

I would like to know if the following is the expected result:
from psql:
bcoproducao=# select to_date(current_date, 'DD/MM/YYYY'), current_date;
  to_date   |    date
------------+------------
 22/08/2005 | 22/08/2005
(1 row)

from my jdbc code:
            rs = stmt.executeQuery("select to_date(current_date, 
'DD/MM/YYYY'), current_date");           
            while (rs.next()) {
                System.out.println(rs.getString(1) + " | " 
+rs.getString(2));
            }
result:
            0028-01-26 | 2005-08-22

Any advice here?
Thanks!
Gilberto





view thread (4+ messages)  latest in thread

Message-ID: <430A2827.9060907@secad.to.gov.br>
Permalink:  ../430A2827.9060907@secad.to.gov.br/
Also on:    postgresql.org/message-id/430A2827.9060907@secad.to.gov.br

 · 

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: gilbertoca@secad.to.gov.br
  Subject: Re: Problem with to_date function
  In-Reply-To: <430A2827.9060907@secad.to.gov.br>
  References: <430A2827.9060907@secad.to.gov.br>

* 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