From timestamp to seconds since epoch?

Поиск
Список
Период
Сортировка
От Erich
Тема From timestamp to seconds since epoch?
Дата
Msg-id 200007180121.SAA04212@cyberpass.net
обсуждение исходный текст
Список pgsql-general
I've read through all the documentation, and I can't find a function
that takes a timestamp and converts iit to seconds since epoch.
Here's what I need to do: I have pairs of timestamps ('2000-07-12
03:33:53+00'), and I want to find out how many seconds are in the
interval between them.  I know I can do

    select timestamp1 - timestamp2

and I get a result in days, hours, mins, and seconds, but is there a
way to get that whole thing in just seconds?  This has to be pretty
efficient, because it's going to get called a lot.

Thanks,

e

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

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: Re: Logging Help Needed
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: From timestamp to seconds since epoch?