Re: conversion from epoch

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: conversion from epoch
Дата
Msg-id 5017102A.5000505@gmail.com
обсуждение исходный текст
Ответ на conversion from epoch  ("Little, Douglas" <DOUGLAS.LITTLE@orbitz.com>)
Список pgsql-general
On 07/30/2012 07:36 AM, Little, Douglas wrote:
> I have an input source that is in epoch time.    Is there a built-in
> conversion to changing to timestamp

http://www.postgresql.org/docs/9.1/interactive/functions-formatting.html
"
to_timestamp(double precision)    timestamp with time zone    convert Unix
epoch to time stamp    to_timestamp(1284352323)
"

So:

test=> SELECT to_timestamp(extract(epoch from now()));
          to_timestamp
-------------------------------
  2012-07-30 15:51:42.587106-07


>
> Thanks
>
> *Doug Little*
>


--
Adrian Klaver
adrian.klaver@gmail.com

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

Предыдущее
От: Vincent Veyron
Дата:
Сообщение: Re: Debian upgrade with PostgreSQL
Следующее
От: Ondrej Ivanič
Дата:
Сообщение: new material for "Postgres for MySQL users" presentation