| From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
|---|---|
| To: | Michael Schuerig <michael(at)schuerig(dot)de> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Setting date format for a single output column? |
| Date: | 2005-09-14 00:32:30 |
| Message-ID: | 20050914003230.GA347@surnet.cl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Wed, Sep 14, 2005 at 02:12:34AM +0200, Michael Schuerig wrote:
>
> 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?
You could SET datestyle just before issuing the query (so it's not a
per-column answer, but per-query), or use the to_char() function instead
of using the default output.
--
Alvaro Herrera -- Valdivia, Chile Architect, www.EnterpriseDB.com
"Aprende a avergonzarte más ante ti que ante los demás" (Demócrito)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matthew Terenzio | 2005-09-14 01:00:18 | Re: Question about PHP and PostgreSQL |
| Previous Message | Michael Schuerig | 2005-09-14 00:12:34 | Setting date format for a single output column? |