Re: Difference between dates - Mailing list pgsql-novice

From Tom Lane
Subject Re: Difference between dates
Date
Msg-id 11648.1230135074@sss.pgh.pa.us
Whole thread Raw
In response to Difference between dates  (Bastiaan Olij <lists@basenlily.nl>)
List pgsql-novice
Bastiaan Olij <lists@basenlily.nl> writes:
> What I'm trying to do is get the difference between two dates either in
> minutes, hours, days, months or years.

Well, you can get the difference in seconds using EXTRACT(EPOCH FROM
timestamp_difference) and then do your own arithmetic ...

            regards, tom lane

pgsql-novice by date:

Previous
From: Bastiaan Olij
Date:
Subject: Difference between dates
Next
From: Bruce Hyatt
Date:
Subject: Re: Fw: Re: connection refused