Re: Syntax for converting double to a timestamp

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Syntax for converting double to a timestamp
Дата
Msg-id 0C55E7C8-9C33-484E-AF42-5578612BD583@seespotcode.net
обсуждение исходный текст
Ответ на Re: Syntax for converting double to a timestamp  (Alban Hertroys <alban@magproductions.nl>)
Ответы Re: Syntax for converting double to a timestamp  (Alban Hertroys <alban@magproductions.nl>)
Список pgsql-general
On Sep 4, 2006, at 17:58 , Alban Hertroys wrote:

> Peter Eisentraut wrote:
>> It's not clear what the meaning of a double precision as a
>> timestamp would be.  How about you make that explicit:
>> "timestamp" * interval '1 second' + timestamp '1900-01-01 00:00:00'
>
> There's also 'EPOCH', which is shorter and more explicit.
>
> timestamp 'EPOCH" + "timestamp" * interval '1 second'

Note that epoch does not mean 1900-01-01 00:00:00.

select timestamp 'epoch';
       timestamp
---------------------
1970-01-01 00:00:00
(1 row)

Michael Glaesemann
grzm seespotcode net



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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Syntax for converting double to a timestamp
Следующее
От: "Daniel Verite"
Дата:
Сообщение: Re: Creating a date/time search function in Postgres.