Re: changing datestyle - Mailing list pgsql-novice

From Tom Lane
Subject Re: changing datestyle
Date
Msg-id 17939.1245173761@sss.pgh.pa.us
Whole thread Raw
In response to Re: changing datestyle  (Karl Nack <karlnack@futurityinc.com>)
Responses Re: changing datestyle
List pgsql-novice
Karl Nack <karlnack@futurityinc.com> writes:
>> (The fact that there are two components is a historical aberration,
>> and I'd be the first to agree it's ugly, but that's how it works.)

> My understanding is that the first component indicates how dates are
> output by default, the second how dates are interpreted upon input
> (to disambiguate between MDY and DMY).

The second one affects field order for some of the output styles, too.
See
http://www.postgresql.org/docs/8.3/static/datatype-datetime.html#DATATYPE-DATETIME-OUTPUT
In particular, tables 8-14 and 8-15 illustrate all the output formatting
options you have.  SQL, MDY might be the closest to what you want.

            regards, tom lane

pgsql-novice by date:

Previous
From: Karl Nack
Date:
Subject: Re: changing datestyle
Next
From: Karl Nack
Date:
Subject: Re: changing datestyle