Setting date format for a single output column?

From: Michael Schuerig <michael(at)schuerig(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Setting date format for a single output column?
Date: 2005-09-14 00:12:34
Message-ID: 200509140212.34963.michael@schuerig.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I'd like to get date columns in the results of a query in the
appropriate format (EUROPEAN, GERMAN). I've tried to set DATESTYLE and
it works as far as PgSQL is concerned. Unfortunately, though, this
confuses the date parsing of the O/R-Mapper I'm using[*]. Is there a way
to set the date style/format on a per column basis for the result
returned by a SELECT statement?

Michael

[*] Rails/ActiveRecord. The problem actually lies still deeper in Ruby's
parsedate standard lib method.

--
Michael Schuerig Thinking is trying to make up
mailto:michael(at)schuerig(dot)de for a gap in one's education.
http://www.schuerig.de/michael/ --Gilbert Ryle

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2005-09-14 00:32:30 Re: Setting date format for a single output column?
Previous Message Keve Nagy 2005-09-13 23:55:43 Re: how to supress Notice messages or decrease verbosity level