Re: PGDATESTYLE

From: "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PGDATESTYLE
Date: 2000-04-24 17:50:34
Message-ID: 20000424125034.B25140@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Apr 24, 2000 at 02:30:01PM -0300, gme(at)ufba(dot)br wrote:
> Hi all,
>
> I'd like to know how I can show a date field in the
> format MM/DD/YYYY. Seting the PGDATESTYLE=European,SQL
> the date field are shown DD/MM/YYYY. What value should I
> set the PGDATESTYLE to show the dates as I want?

Try US,SQL or NonEuropean,SQL:

reedstrm=> set datestyle='NonEuropean,SQL';
SET VARIABLE
reedstrm=> show datestyle;
NOTICE: DateStyle is SQL with US (NonEuropean) conventions
SHOW VARIABLE
reedstrm=> select date(now());
date
----------
04/24/2000
(1 row)

reedstrm=> set datestyle='European,SQL';
SET VARIABLE
reedstrm=> select date(now());
date
----------
24/04/2000
(1 row)

Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm(at)rice(dot)edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joachim Achtzehnter 2000-04-24 18:01:57 Re: Revisited: Transactions, insert unique.
Previous Message Ed Loehr 2000-04-24 17:49:09 Re: Revisited: Transactions, insert unique.