Re: date math: converting interval result to seconds

Поиск
Список
Период
Сортировка
От Peter Gibbs
Тема Re: date math: converting interval result to seconds
Дата
Msg-id 027c01c2478e$91181d40$0b01010a@emkel.co.za
обсуждение исходный текст
Ответ на date math: converting interval result to seconds  (Daniel Kelley <dkelley@otec.com>)
Список pgsql-general
Daniel Kelley wrote:

> i'm trying to do something like this:
>
> triv=> SELECT current_timestamp-stime as tm FROM triv_a_r WHERE tq_id =
> 'QM7DGLU15' AND fid_c = 'PTA42BEAE';
>           tm
> -----------------------
>  2 days 18:32:46.06146
> (1 row)
>
>
> but i'd like the resulting interval to be represented in seconds.  i've

select date_part('epoch', current_timestamp-stime)

--
Peter Gibbs
EmKel Systems



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

Предыдущее
От: Daniel Kelley
Дата:
Сообщение: date math: converting interval result to seconds
Следующее
От: Curt Sampson
Дата:
Сообщение: Re: Success: Finished porting application to postgreSQL