Re: How Can I set a non standard date format?

From: "Andrej Ricnik-Bay" <andrej(dot)groups(at)gmail(dot)com>
To: "clark(at)knowideas(dot)com" <clark(at)knowideas(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How Can I set a non standard date format?
Date: 2007-03-02 20:36:27
Message-ID: b35603930703021236o28254d6auaef5ffcba3310a3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2 Mar 2007 11:20:28 -0800, clark(at)knowideas(dot)com <clark(at)knowideas(dot)com> wrote:
> Hi All Esteemed Developers,
>
> I have a requirement to have dates like ddmmmyyy. ie: 03MAR07
>
> I want to be able to have dates returned from a query in this format
> so that I can use passthrough queries from Access. I know I can use
> to_char to format the date anyway I want, but this causes the column
> to appear as a text datatype instead of a date datatype.
>
> I am exporting the data to Excel, and the columns that have dates
> formatted as text do not sort properly. That is why I want the column
> to remain a date type.
>
> In Oracle I could use NLS_TIMESTAMP_FORMAT to accomplish this. But I
> cannot find a way to use PGDATESTYLE or anything else to to the same
> thing.
>
> Any ideas?
http://www.postgresql.org/docs/8.2/interactive/ecpg-pgtypes.html

PGTYPESdate_fmt_asc

Best of luck.

> best regards,
> billc
Cheers,
Andrej

In response to

Browse pgsql-general by date

  From Date Subject
Next Message dlivesay 2007-03-02 20:59:00 I'd love to know what the rest of this error message is.
Previous Message Andrej Ricnik-Bay 2007-03-02 20:24:13 Re: PG Dump 8.2