Re: Error: Bad Timestamp Format - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Error: Bad Timestamp Format
Date
Msg-id 20010913100955.B4379@svana.org
Whole thread Raw
In response to Re: Error: Bad Timestamp Format  (Graham Leggett <minfrin@sharp.fm>)
List pgsql-general
On Wed, Sep 12, 2001 at 06:55:50PM +0200, Graham Leggett wrote:
> > Check the datestypes. Try setting it to european conventions, maybe that
> > will work better
>
> I thought that is what I was doing with "SHOW DATETYPES".
>
> What format is the date "2001-09-12 14:14:12.03-04"?
>                                  ^^-- day

The datestyle is two independant variables, watch:

> show datestyle;
NOTICE:  DateStyle is ISO with European conventions
> set datestyle=us;
SET VARIABLE
> show datestyle;
NOTICE:  DateStyle is ISO with US (NonEuropean) conventions
> set datestyle=sql;
SET VARIABLE
> show datestyle;
NOTICE:  DateStyle is SQL with US (NonEuropean) conventions
> set datestyle=european;
SET VARIABLE
> show datestyle;
NOTICE:  DateStyle is SQL with European conventions

It affects the formatting of dates in various ways. Maybe it's fixed in
recent versions but there was a time where ISO/non-US wouldn't parse
2001-09-30.

--
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/
> Magnetism, electricity and motion are like a three-for-two special offer:
> if you have two of them, the third one comes free.

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Error: Bad Timestamp Format
Next
From: "Randy Hall"
Date:
Subject: Re: postgresql.com