converting an epoch to a timestamp

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема converting an epoch to a timestamp
Дата
Msg-id GNELIHDDFBOCMGBFGEFOMEBECBAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответы Re: converting an epoch to a timestamp  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
How does one go about converting a UNIX epoch (ie. int4) to a timestamp?

These don't work:

("datetime" is the int4 field)

extract(timestamp from epoch datetime)
extract(timestamp from datetime)

I'm using 7.1.3, but am also interested in 7.2 solutions.  And if it isn't
part of extract, shouldn't it be?

Chris



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

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: problem with date and to_char
Следующее
От: Tom Lane
Дата:
Сообщение: Re: converting an epoch to a timestamp