converting timestamps to ints

Поиск
Список
Период
Сортировка
От Morgan Curley
Тема converting timestamps to ints
Дата
Msg-id 4.3.2.7.2.20010802232942.026cf950@e4media.com
обсуждение исходный текст
Ответы Re: converting timestamps to ints
Список pgsql-sql
I am writing an app that will need to do some calcs based on differences 
between when a record is first inserted and when it is last updated.
I have seen a lot of column::data-type in this list but can't find the 
relevant section in the documentation. Can anyone point me in the right 
direction?

Currently I am using some code I have seen earlier on this list
select username,  extract( epoch from update_timestamp) - extract( epoch 
from create_timestamp) as time_diff from users;

Is there a simpler way to do this?

Thanks,
Morgan 



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

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: More Database Design Stuff
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Re: converting timestamps to ints