Re: Date Anomaly?? - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: Date Anomaly??
Date
Msg-id 20030507085145.L26747-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Date Anomaly??  (Thomas Good <tomg@sqlclinic.net>)
List pgsql-sql
On Wed, 7 May 2003, Thomas Good wrote:

> On Wed, 7 May 2003, Tom Lane wrote:
>
> > Thomas Good <tomg@sqlclinic.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?



pgsql-sql by date:

Previous
From: Jean-Luc Lachance
Date:
Subject: Re: ERROR:  pg_atoi: error in "NULL": can't
Next
From: Stephan Szabo
Date:
Subject: Re: array in a reference