Re: date format

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: date format
Date: 2007-03-04 19:26:53
Message-ID: 45EB1D7D.7000102@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)iol(dot)ie
---------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2007-03-04 19:34:17 Re: date format
Previous Message Joris Dobbelsteen 2007-03-04 19:18:56 Re: supporting 2000 simultaneous connections.