time calculation

From: qradius(at)qnet(dot)com(dot)pe
To: pgsql-general(at)postgresql(dot)org
Subject: time calculation
Date: 2001-11-29 05:11:27
Message-ID: 200111291510.fATFAcm73179@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear sirs:

Please I need to solve this problem:

I need to sustract two values timestamp type and return the
difference in seconds, exists some funciton on postgresql for
do this?

e.g:

I have value1='2001-10-01 12:50:13' and value2='2001-09-10
12:53:10'

I need to calculate value1-value2 and return how many seconds
there are between both timestamps.

thank you

Ernesto

---------------------------------------------
Este mensaje fue enviado a travs de Qnet
http://www.qnet.com.pe

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-11-29 05:23:48 Re: error on drop table
Previous Message Mike Mascari 2001-11-29 05:02:45 Re: pg_dump and order of events