Re: time to integer - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: time to integer
Date
Msg-id Pine.LNX.4.30.0103062038380.778-100000@peter.localdomain
Whole thread Raw
In response to time to integer  (Soma Interesting <dfunct@telus.net>)
List pgsql-general
Soma Interesting 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', value) /* seconds since 1970 */

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Date question
Next
From: "Paulo Parola"
Date:
Subject: RPMs for PHP accessing PostgreSQL via ODBC over RedHat