Skip site navigation (1) Skip section navigation (2)

Duration betweeen 2 timestamps

From: phil campaigne <pcampaigne(at)charter(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Duration betweeen 2 timestamps
Date: 2005-02-04 15:34:38
Message-ID: 4203960E.903@charter.net (view raw or flat)
Thread:
Lists: pgsql-novice
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



pgsql-novice by date

Next:From: Arthur van DorpDate: 2005-02-04 15:34:56
Subject: Re: [despammed] Re: Using a preprocessor for constants in
Previous:From: Andreas KretschmerDate: 2005-02-04 14:38:37
Subject: Re: [despammed] Re: Using a preprocessor for constants in SQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group