Обсуждение: date formats with ecpg and JDBC

Поиск
Список
Период
Сортировка

date formats with ecpg and JDBC

От
"Nicolas Bazin"
Дата:
I have that application that handles dates in US format. I setup the variable DATESTYLE to US and dates are parsed correctly when I write in the database, but when I read a date then I always get it in ISO format? Is it normal or a bug? Or I need to do something else I dont do?

Re: date formats with ecpg and JDBC

От
Thomas Lockhart
Дата:
> I have that application that handles dates in US format. I setup the
> variable DATESTYLE to US and dates are parsed correctly when I write
> in the database, but when I read a date then I always get it in ISO
> format? Is it normal or a bug? Or I need to do something else I dont
> do?

Look at the other options available for SET DATESTYLE.
                  - Tom


Re: date formats with ecpg and JDBC

От
Thomas Lockhart
Дата:
> Well I see that the output formats are either:
> ISO, SQL, Postgres or German. I don't know what "traditional Postgres
> format" is but any of this list seems to be what I want.
> Does it mean that Postgres cannot output dates in US format?

What do you mean by "US format"? I live in the US and the formats look
pretty reasonable to me. Try SQL for starters...
                - Thomas


Re: date formats with ecpg and JDBC

От
"Nicolas Bazin"
Дата:
Well I see that the output formats are either:
ISO, SQL, Postgres or German. I don't know what "traditional Postgres
format" is but any of this list seems to be what I want.
Does it mean that Postgres cannot output dates in US format?

----- Original Message -----
From: "Thomas Lockhart" <lockhart@fourpalms.org>
To: "Nicolas Bazin" <nbazin@ingenico.com.au>
Cc: <pgsql-interfaces@postgresql.org>
Sent: Friday, May 17, 2002 11:23 AM
Subject: Re: [INTERFACES] date formats with ecpg and JDBC


> > I have that application that handles dates in US format. I setup the
> > variable DATESTYLE to US and dates are parsed correctly when I write
> > in the database, but when I read a date then I always get it in ISO
> > format? Is it normal or a bug? Or I need to do something else I dont
> > do?
>
> Look at the other options available for SET DATESTYLE.
>
>                    - Tom
>
>