Re: How to convert US date format to European date format ? - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: How to convert US date format to European date format ?
Date
Msg-id kk3oj3$1qn$1@ger.gmane.org
Whole thread Raw
In response to How to convert US date format to European date format ?  (Condor <condor@stz-bg.com>)
Responses Re: How to convert US date format to European date format ?
List 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
whendisplaying it. 

If you change the "datestyle" parameter in postgresql.conf, it will influence the way psql displays the date values.
ProbablypgAdmin will also check that setting (as I don't use pgAdmin I can't really tell). 

Thomas


pgsql-general by date:

Previous
From: Condor
Date:
Subject: How to convert US date format to European date format ?
Next
From: Adrian Klaver
Date:
Subject: Re: How to convert US date format to European date format ?