Re: time calculation - Mailing list pgsql-general

From Antonio Fiol Bonnín
Subject Re: time calculation
Date
Msg-id 3C065D1A.3BAC7201@w3ping.com
Whole thread Raw
In response to time calculation  (qradius@qnet.com.pe)
List pgsql-general
extract ( epoch from (value1-value2) )



qradius@qnet.com.pe wrote:

> 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 través de Qnet
> http://www.qnet.com.pe
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


pgsql-general by date:

Previous
From: qradius@qnet.com.pe
Date:
Subject: time calculation
Next
From: Jason Earl
Date:
Subject: Re: Licensing