Received: from victoria.host4u.net (victoria.host4u.net [216.71.64.77]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f733oxf21308 for ; Thu, 2 Aug 2001 23:50:59 -0400 (EDT) (envelope-from mcurley@e4media.com) Received: from morganc.e4media.com (adsl-162-83-166-90.nyc.adsl.bellatlantic.net [162.83.166.90]) by victoria.host4u.net (8.8.5/8.8.5) with ESMTP id WAA12720 for ; Thu, 2 Aug 2001 22:49:48 -0500 Message-Id: <4.3.2.7.2.20010802232942.026cf950@e4media.com> X-Sender: mcurley@e4media.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Thu, 02 Aug 2001 23:50:58 -0400 To: pgsql-sql From: Morgan Curley Subject: converting timestamps to ints Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Archive-Number: 200108/23 X-Sequence-Number: 4244 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