Re: datestyle

From: "Jaime Casanova" <systemguards(at)gmail(dot)com>
To: "listapostgres(at)hotmail(dot)com" <listapostgres(at)hotmail(dot)com>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: datestyle
Date: 2006-08-15 16:08:12
Message-ID: c2d9e70e0608150908w7dcc5af3l4cf3943a6f721055@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

> >
> >Adicionalmente a todo esto, tengo una aplicacion web, estoy trabajando con
> >java, esta se conecta a postgres para tratar los reportes. Pero al igual
> >que el pgadmin me muestra la fecha con otro formato, ¿si la configuracion
> >dice otra cosa, por que entonces se muestra de esta manera?. Intente
> >colocar antes de la llamada del reporte un "set datestyle = 'sql,dmy' " y
> >me arroja un error:
> >
> >org.postgresql.util.PSQLException: The server's DateStyle parameter was
> >changed to SQL, DMY. The JDBC driver requires DateStyle to begin with ISO
> >for correct operation.
> >

en cuanto a tu problema en el jdbc, puedes revisar esto:
http://jdbc.postgresql.org/documentation/head/escapes-datetime.html

tambien lei por ahi que se aconseja usar PreparedSatetement para que
puedas usar una variable java.util.DATE

y para formatear la salida usar getDate() y java.text.DateFormat, en
vez de getString()

--
Atentamente,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Leonel Nunez 2006-08-15 16:10:17 Re: Uso de la ñ, y otros caracteres.
Previous Message listapostgres 2006-08-15 15:43:38 RE: datestyle