Обсуждение: get difference between two timestamp value in second?

Поиск
Список
Период
Сортировка

get difference between two timestamp value in second?

От
"Sergiy Ovcharuk"
Дата:
Hello Group!
Does anybody knows how I can get the difference between two date (timestamp)
is secondes or convert timestamp to integer or float type (in any acceptable
sense).

Thank you in advance,
Sergiy.





Re: get difference between two timestamp value in second?

От
Thomas Lockhart
Дата:
> Does anybody knows how I can get the difference between two date (timestamp)
> is secondes or convert timestamp to integer or float type (in any acceptable
> sense).

lockhart=# select date_part('epoch', timestamp 'today' - timestamp
'yesterday');date_part 
-----------    86400