date/time

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

date/time

От:
snef <snef@soneramail.nl>
Дата:
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

От:
Ian Harding <iharding@pakrat.com>
Дата:
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

От:
Ian Harding <iharding@pakrat.com>
Дата:
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

От:
Patrick Welche <prlw1@newn.cam.ac.uk>
Дата:
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
FAQ