Re: time to integer - Mailing list pgsql-general

From Tom Lane
Subject Re: time to integer
Date
Msg-id 6966.983906856@sss.pgh.pa.us
Whole thread Raw
In response to time to integer  (Soma Interesting <dfunct@telus.net>)
Responses Re: time to integer
List pgsql-general
Soma Interesting <dfunct@telus.net> writes:
> I'm trying to write a function with pl/pgsql that takes member_id (int4)
> and adds this to now() converted to seconds. Is there an existing function
> to do the conversion of a timestamp to seconds?

date_part('epoch', timestamp) produces a Unix-style seconds count.

            regards, tom lane

pgsql-general by date:

Previous
From: "Gregory Wood"
Date:
Subject: Re: SQL article
Next
From: "Francis Solomon"
Date:
Subject: RE: [SQL] Date question