Re: changing datestyle

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karl Nack <karlnack(at)futurityinc(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: changing datestyle
Date: 2009-06-16 17:36:01
Message-ID: 17939.1245173761@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Karl Nack <karlnack(at)futurityinc(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Karl Nack 2009-06-16 17:48:52 Re: changing datestyle
Previous Message Karl Nack 2009-06-16 17:28:28 Re: changing datestyle