Thread: date/time

date/time

From
snef
Date:
Hi,
I have read the man's with Postgres.
But I can't seem to get Postgres use European time notation (dd/mm/yyyy).

Where can I adjust this? (in which file?)

Snef

Re: date/time

From
Ian Harding
Date:
snef wrote:

> Hi,
> I have read the man's with Postgres.
> But I can't seem to get Postgres use European time notation (dd/mm/yyyy).
>
> Where can I adjust this? (in which file?)
>
> Snef

SET DATESTYLE TO 'SQL, EUROPEAN';
SELECT NOW();



Re: date/time

From
Ian Harding
Date:
snef wrote:

> Hi,
> I have read the man's with Postgres.
> But I can't seem to get Postgres use European time notation (dd/mm/yyyy).
>
> Where can I adjust this? (in which file?)
>
> Snef

Actually, I think you may want the environment variable PGDATESTYLE.  It
sets the datestyle for new connections.  That is all I know about it!

Ian


Re: [GENERAL] Re: date/time

From
Patrick Welche
Date:
On Tue, Jan 16, 2001 at 07:24:15PM -0800, Ian Harding wrote:
> snef wrote:
>
> > Hi,
> > I have read the man's with Postgres.
> > But I can't seem to get Postgres use European time notation (dd/mm/yyyy).
> >
> > Where can I adjust this? (in which file?)
> >
> > Snef
>
> Actually, I think you may want the environment variable PGDATESTYLE.  It
> sets the datestyle for new connections.  That is all I know about it!

Either set the environment variable PGDATESTYLE to 'Postgres,European' or
send the query

set datestyle='Postgres,European'

(I think SQL instead of Postgres works too)

eg:
quartz% printenv PGDATESTYLE
Postgres,European

rfb=# show datestyle;
NOTICE:  DateStyle is Postgres with European conventions
SHOW VARIABLE


Cheers,

Patrick