Thread: French date

French date

From
evon600c
Date:
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.

Re: French date

From
Oliver Elphick
Date:
On Tue, 2002-12-31 at 10:10, 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 ?


SET DATESTYLE TO 'ISO,EUROPEAN'


> I wish i had not to set some easy forgetable environment variables such
> as LC_TIME.

For release 7.3 you can add this line to postgresql.conf:

DATESTYLE = 'ISO,European'

In earlier releases, you could define the environment variable

export PGDATESTYLE=ISO,European

before starting the postmaster - you could include it in your startup
script.
--
Oliver Elphick <olly@lfix.co.uk>
LFIX Limited