Re: How to convert US date format to European date format ?

From: Condor <condor(at)stz-bg(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to convert US date format to European date format ?
Date: 2013-04-12 07:42:19
Message-ID: 15c9ea580d8062f68eefcaaf02be3fc7@stz-bg.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2013-04-10 22:35, Thomas Kellerer wrote:
> John R Pierce wrote on 10.04.2013 21:28:
>> On 4/10/2013 6:15 AM, Thomas Kellerer wrote:
>>> psql (one of the possible client applications) uses the "datestyle"
>>> parameter to decide on how to format a date column when displaying
>>> it.
>>>
>>> If you change the "datestyle" parameter in postgresql.conf, it will
>>> influence the way psql displays the date values. Probably pgAdmin
>>> will also check that setting (as I don't use pgAdmin I can't really
>>> tell).
>>
>> PSQL doesn't use that, postgres itself does. it can be set on the
>> fly with SET on a per-connection basis, or with ALTER DATABASE on a
>> per-database basis.
>
>
> But the *display* is done by the client.
> And if Postgres (the server) did the conversion, I would not be able
> to see a different date formatting in e.g. a JDBC based tool. So I
> guess psql is reading that database/server setting.

Hello again,
what parameter should I use to have date in format:

dd-mm-yyyy ? I try to use Posgtgres, DMY and it's seems is work,
but not in my case, because I have also a field:

last_date timestamp without time zone default
('now'::text)::timestamp(6) with time zone

and ISO, DMY show me: 2012-10-15 11:00:49.397908 if I use Postgres, DMY
show me
Mon 15 Oct 11:00:49.397908 2012

But I want to be formatted: 11:00:49 15-10-2012

Is this possible to be done ?

Cheers,
Hristo S.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2013-04-12 07:59:54 Re: How to convert US date format to European date format ?
Previous Message Baboo, Isa 2013-04-12 07:16:38 Re: list non alphanumeric