Re: time to integer

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:27:36
Message-ID: 6966.983906856@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Soma Interesting <dfunct(at)telus(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martin A. Marques 2001-03-06 19:28:09 Re: PostgreSQL 7 on Solaris 8 - Is it working?
Previous Message Michael Fork 2001-03-06 19:26:58 Re: [SQL] Date question