From: Morgan Curley <mcurley@e4media.com>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: converting timestamps to ints
Date: Thu, 02 Aug 2001 23:50:58 -0400
Message-ID: <4.3.2.7.2.20010802232942.026cf950@e4media.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mcurley@e4media.com
Subject: Re: converting timestamps to ints
In-Reply-To: <4.3.2.7.2.20010802232942.026cf950@e4media.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox