Re: Date difference in seconds

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Date difference in seconds
Дата
Msg-id 28779.982951486@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Date difference in seconds  ("Raghunath T" <raghunatht@mindtree.com>)
Список pgsql-general
"Raghunath T" <raghunatht@mindtree.com> writes:
> Now I want the difference between start time and end time in seconds.
>         Select date_part('seconds',start_time - end_time) from temp;  gives
> me only the difference between the seconds value in both timestamps. It
> ignores all the days, hrs, minutes etc.

Try  "date_part('epoch',start_time - end_time)".  See
http://www.postgresql.org/devel-corner/docs/postgres/functions-datetime.html

            regards, tom lane

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

Предыдущее
От: "Sergio A. Kessler"
Дата:
Сообщение: pgPICK or sePICK
Следующее
От: Wayne Ward
Дата:
Сообщение: Still having some install problems.