Re: converting seconds since epoch to time string

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: converting seconds since epoch to time string
Дата
Msg-id 6963.974244233@sss.pgh.pa.us
обсуждение исходный текст
Ответ на converting seconds since epoch to time string  (Bill Morrow <wmorrow@home.com>)
Список pgsql-novice
Bill Morrow <wmorrow@home.com> writes:
> I have an integer column which holds a time represented
> as the number of seconds since 1970/01/01 00:00 UTC. I want to
> view this table with the time converted to an understandable text string.

Casting to abstime should do it; from there you might want to convert
to timestamp so you can invoke to_char, if you don't like the default
display format.

Next time, try representing the column as a date/time datatype in the
first place ;-)

            regards, tom lane

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

Предыдущее
От: Bill Morrow
Дата:
Сообщение: converting seconds since epoch to time string
Следующее
От: ghaverla@freenet.edmonton.ab.ca
Дата:
Сообщение: Re: converting seconds since epoch to time string