Re: Date Anomaly??

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Thomas Good <tomg(at)sqlclinic(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ian Barwick <barwick(at)gmx(dot)net>, Postgres SQL List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Date Anomaly??
Date: 2003-05-07 15:52:36
Message-ID: 20030507085145.L26747-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Wed, 7 May 2003, Thomas Good wrote:

> On Wed, 7 May 2003, Tom Lane wrote:
>
> > Thomas Good <tomg(at)sqlclinic(dot)net> writes:
> > > Another item: if I say 'export PGDATESTYLE=US' and ask psql for
> > > the date I get back an ISO date (YYYY-MM-DD). What region of this
> > > US is this, I wonder? Must be San Francisco (maybe Josh knows ;-)
> >
> > That's only setting a substyle --- one that's not relevant to the ISO
> > major style (at least not on output). See the SET reference page.
>
> Tom,
>
> So the closest approximation to the default "postgres[ql]" date style
> of MM-DD-YYYY (note delimiters) is: SQL,US which returns a
> MM/DD/YYYY 00:00:00 value when doing some date arithmetic?

I think you're getting a timestamp after doing that date arithmetic. Does
casting it back to a date help any?

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2003-05-07 15:53:58 Re: array in a reference
Previous Message Jean-Luc Lachance 2003-05-07 15:47:01 Re: ERROR:   pg_atoi: error in "NULL": can't