From: | Thomas Kellerer <spam_eater(at)gmx(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to convert US date format to European date format ? |
Date: | 2013-04-10 13:15:21 |
Message-ID: | kk3oj3$1qn$1@ger.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Condor, 10.04.2013 15:03:
> Hello ppl,
>
> I have a database where the previous owner use US date format in date fields:
>
> 2009-02-18
>
> Is there a way how to convert the fields in European format 18-02-2009.
> I mean existing date in records. What's will be happened if I change format
> in postgresql.conf ?
A date column does NOT have a format.
The format is only applied by the client application when _displaying_ the date.
Btw. 2009-02-18 is not the US format, it's the ISO format, in the US the format 02/18/2012 is used.
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).
Thomas
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2013-04-10 13:17:19 | Re: How to convert US date format to European date format ? |
Previous Message | Condor | 2013-04-10 13:03:45 | How to convert US date format to European date format ? |