Re: Create Timestamp From Date and Time

Поиск
Список
Период
Сортировка
От Jean-Christian Imbeault
Тема Re: Create Timestamp From Date and Time
Дата
Msg-id 3DE4F468.9040209@mega-bucks.co.jp
обсуждение исходный текст
Ответ на Create Timestamp From Date and Time  ("Ron St.Pierre" <rstpierre@syscor.com>)
Список pgsql-general
Ron St.Pierre wrote:
> Example - when I run the following:
>       select timestamp(date '1998-02-24',time '23:07')
> I get the following error:
>       parse error at or near "date"

what you want is:

select to_timestamp('1998-02-24 23:07'::text, 'YYYY-MM-DD HH:MI');
       to_timestamp
------------------------
  1998-02-24 23:07:00+09
(1 row)

Have a look at:

http://www.postgresql.org/idocs/index.php?functions-formatting.html

Jc


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Create Timestamp From Date and Time
Следующее
От: Neil Conway
Дата:
Сообщение: Re: rename