Re: Date style handling changes between 7.4.12 and 8.2.4

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Date style handling changes between 7.4.12 and 8.2.4
Дата
Msg-id B1BE5464-5FA0-4655-B4D5-8BBA8696CDFA@seespotcode.net
обсуждение исходный текст
Ответ на Date style handling changes between 7.4.12 and 8.2.4  (Adam Witney <awitney@sgul.ac.uk>)
Список pgsql-general
On Jun 12, 2007, at 4:04 , Adam Witney wrote:

> bugasbase_070529=# insert into date_test values('Wed Jul 11 10:51:14
> GMT+01:00 2001');
> ERROR:  invalid input syntax for type date: "Wed Jul 11 10:51:14 GMT
> +01:00
> 2001"

> I have found date_trunc and extract in the docs,

Both date_trunc and extract work on date and timestamp datatypes.
What you are looking for is something to convert a string to a date:
to_date should work:

http://www.postgresql.org/docs/8.2/interactive/functions-formatting.html

Michael Glaesemann
grzm seespotcode net



В списке pgsql-general по дате отправления:

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: PL/PGSQL rowtype return problem
Следующее
От: Kevin Hunter
Дата:
Сообщение: Re: Suppress checking of chmod 700 on data-dir?