Re: time to integer

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Soma Interesting <dfunct(at)telus(dot)net>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: time to integer
Date: 2001-03-06 19:39:21
Message-ID: Pine.LNX.4.30.0103062038380.778-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net http://yi.org/peter-e/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-03-06 19:40:25 Re: Date question
Previous Message Tom Lane 2001-03-06 19:31:19 Re: pg_log