On Fri, Feb 04, 2005 at 10:37:52AM -0500, phil campaigne wrote:
>
> 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.
Have you tried just subtracting them? That will give you a value of
type "interval" which you can then store...
Hope this helps,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.