Re: Error: Bad Timestamp Format

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Error: Bad Timestamp Format
Дата
Msg-id 20010913100955.B4379@svana.org
обсуждение исходный текст
Ответ на Re: Error: Bad Timestamp Format  (Graham Leggett <minfrin@sharp.fm>)
Список 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 по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Error: Bad Timestamp Format
Следующее
От: "Randy Hall"
Дата:
Сообщение: Re: postgresql.com