From: Bruno Wolff III <bruno@wolff.to>
To: Cal McPherson <calm@adtec.com.au>
Cc: 'pgsql-interfaces@postgresql.org' <pgsql-interfaces@postgresql.org>
Subject: Re: inserting time_t into timestamp field(C language)
Date: Tue, 16 Mar 2004 22:26:37 -0600
Message-ID: <20040317042637.GA26525@wolff.to> (raw)
In-Reply-To: <65ED19764468D411A6AF006094EA0F3B275D73@SERVER>
References: <65ED19764468D411A6AF006094EA0F3B275D73@SERVER>
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)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: bruno@wolff.to, calm@adtec.com.au
Subject: Re: inserting time_t into timestamp field(C language)
In-Reply-To: <20040317042637.GA26525@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox