Duration between two timestamps

From: phil campaigne <pcampaigne(at)charter(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Duration between two timestamps
Date: 2005-02-04 15:37:52
Message-ID: 420396D0.3080109@charter.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi All,
I have stored event records in Postgresql 7.3.4 and now need to
calculate the duration between each event in succession. I have
"record_id" and a" timestamp without time zone" columns for each event.

What is a good way to calculate the difference in timestamp and store it
in the record as duration. I am doing this as part of a java
application on RH linux 8.0.

My timestamp is of the form "2005-01-30 07:51:29.149458".
thanks in advance,
Phil

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ignacio Colmenero 2005-02-04 16:06:49 Questions about functionality
Previous Message Art Fore 2005-02-04 15:33:08 Re: Postgresql 8.0 beta 5 setup in windowsxp