Re: inserting time_t into timestamp field(C language) - Mailing list pgsql-interfaces

From Bruno Wolff III
Subject Re: inserting time_t into timestamp field(C language)
Date
Msg-id 20040317042637.GA26525@wolff.to
Whole thread Raw
In response to inserting time_t into timestamp field(C language)  (Cal McPherson <calm@adtec.com.au>)
List pgsql-interfaces
On Wed, Mar 17, 2004 at 11:29:10 +1100, Cal McPherson <calm@adtec.com.au> wrote:
> What is the most efficient way to convert a time_t struct so that I can
> insert it into a timestamp field.

Probably by converting to abstime and then to timestamp.
For example:
area=> select 1079497559::abstime::timestamp;     timestamp
---------------------2004-03-16 22:25:59
(1 row)


pgsql-interfaces by date:

Previous
From: Jonathan Gardner
Date:
Subject: Extending PlPythonU
Next
From: "Vickriz Buenaventuura"
Date:
Subject: libpgtcl.so?