converting timestamps to ints - Mailing list pgsql-sql

From Morgan Curley
Subject converting timestamps to ints
Date
Msg-id 4.3.2.7.2.20010802232942.026cf950@e4media.com
Whole thread Raw
Responses Re: converting timestamps to ints  ("Josh Berkus" <josh@agliodbs.com>)
List 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 by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: More Database Design Stuff
Next
From: "Josh Berkus"
Date:
Subject: Re: converting timestamps to ints