Re: Sort by foreign date column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: "Andrey Y(dot) Mosienko" <feo(at)ttn(dot)ru>, Postgres <pgsql-general(at)postgresql(dot)org>
Subject: Re: Sort by foreign date column
Date: 2001-08-21 14:09:09
Message-ID: 29326.998402949@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Tue, 21 Aug 2001, Andrey Y. Mosienko wrote:
> But in Russia we have the next date format: DD-MM-YYYY.

Just setting DateStyle to 'SQL' would get you approximately what you
want:

regression=# set DateStyle TO SQL;
SET VARIABLE
regression=# select now();
now
----------------------------
21/08/2001 10:07:04.00 EDT
(1 row)

regression=# select now()::date;
?column?
------------
21/08/2001
(1 row)

If DD/MM/YYYY is not close enough for you, maybe the right answer is to
add another DateStyle.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ryan C. Bonham 2001-08-21 14:16:21 UPDATE: ERROR: relation_info: Relation 41069 not found
Previous Message Jim Buttafuoco 2001-08-21 14:01:48 RE: clustering and/or failover?