Subtracting time fields

Поиск
Список
Период
Сортировка
От Kevin Old
Тема Subtracting time fields
Дата
Msg-id 1036188325.6778.67.camel@oc
обсуждение исходный текст
Ответы Re: Subtracting time fields  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-sql
Hello all,

I have two fields in my database access_time and release_time.....I
would like to calculate the "duration" between these two values, but
can't figure out what to do.  

I've tried something like this but it doesn't work:

select access_time, release_time, time(access_time) - time(release_time)
as duration from mastertbl limit 10

Any suggestions?

Thanks,
Kevin
-- 
Kevin Old <kold@carolina.rr.com>



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

Предыдущее
От: "Chad Thompson"
Дата:
Сообщение: Re: making queries more effecient
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: making queries more effecient