Re: French date

From: Jean-Michel Chabanne <jeanmichel(dot)chabanne(at)free(dot)fr>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: French date
Date: 2003-01-01 20:02:09
Message-ID: auvhce$1hmv$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jean-Michel Chabanne wrote:
> evon600c wrote:
>
>> Hello,
>> Is there a simple way to configure the postgres server so that it
>> always understand the french date format 'dd/mm/yyyy' ?
>> Or is there a call i can perform in my client application that could
>> have the same effect ?
>>
>> I wish i had not to set some easy forgetable environment variables
>> such as LC_TIME.
>> For instance in SQL Server i was able to issue a "set dateformat
>> 'dmy'" in the begining of all my transactions to get it done and that
>> was fine for me (and my customers...)
>>
>> Many thank's in advance.
>
>
> Wen connected you may do SET DateStyle = 'SQL,European';
>
> Or, with pgsql, before the connection you may export the variable
> PGDATESTYLE='SQL,European'
>
> This should work fine, but I have noticed that it does not work on one
> of my DB and I don't know why.
>

Now I know why !!!

First I did in the first DB :

SET DateStyle = 'SQL,European';
Some SELECT queries ...

Then I changed the DB connection with " \c test ", but when I was
connected to test DB I had to type again SET DateStyle = 'SQL,European';

--
Jean-Michel Chabanne
77450 MONTRY (FRANCE)
48" 54' N - 2" 49' E
Powered by Linux

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dan Langille 2003-01-01 21:02:25 pg-based polling/voting script
Previous Message Tom Lane 2003-01-01 19:34:53 Re: compiling 7.3 on RH7.2