Re: TIMESTAMP difference - Mailing list pgsql-general

From Rodrigo De León
Subject Re: TIMESTAMP difference
Date
Msg-id a55915760712101207j2313d170h3e75437a62d5e310@mail.gmail.com
Whole thread Raw
In response to TIMESTAMP difference  (rihad <rihad@mail.ru>)
Responses Restore problem
List pgsql-general
On Dec 10, 2007 2:13 PM, rihad <rihad@mail.ru> wrote:
> Hi, is there a way to get the difference in hours between two
> timestamps?

SELECT (EXTRACT (EPOCH FROM TIMESTAMP '20071211 00:00') - EXTRACT
(EPOCH FROM TIMESTAMP '20071209 01:00')) * INTERVAL '1 second';

pgsql-general by date:

Previous
From: Nathan Wilhelmi
Date:
Subject: Script to reset all sequence values in the a given DB?
Next
From: "Keith Turner"
Date:
Subject: Restore problem