From: Raymond O'Donnell <rod@iol.ie>
To: pgsql-general@postgresql.org
Subject: Re: date format
Date: Sun, 04 Mar 2007 19:26:53 +0000
Message-ID: <45EB1D7D.7000102@iol.ie> (raw)
In-Reply-To: <200703041856.20139.garry@schoolteachers.co.uk>
References: <200703041247.05097.garry@schoolteachers.co.uk>
<200703041705.44507.garry@schoolteachers.co.uk>
<20070304170935.GC11685@svana.org>
<200703041856.20139.garry@schoolteachers.co.uk>
On 04/03/2007 18:56, Garry Saddington wrote:
>> # select now();
>> now
>> -------------------------------
>> 2007-03-04 18:07:54.626267+01
>> (1 row)
>>
>> Which is precisely what I expect.
> Which is precisely what I get, but I want 04-03-2007.
Ahh! Then you need to use to_char(). The datestyle setting in
postgresql.conf differentiates *only* between European and American date
formats - i.e. the relative order of day and month. It doesn't set the
exact output format.
Ray.
---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: rod@iol.ie
Subject: Re: date format
In-Reply-To: <45EB1D7D.7000102@iol.ie>
References: <200703041247.05097.garry@schoolteachers.co.uk> <200703041705.44507.garry@schoolteachers.co.uk> <20070304170935.GC11685@svana.org> <200703041856.20139.garry@schoolteachers.co.uk> <45EB1D7D.7000102@iol.ie>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox