pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedinserting time_t into timestamp field(C language)
2+ messages / 2 participants
[nested] [flat]
* inserting time_t into timestamp field(C language)
@ 2004-03-17 00:29 Cal McPherson <calm@adtec.com.au>
0 siblings, 1 reply; 2+ messages in thread
From: Cal McPherson @ 2004-03-17 00:29 UTC (permalink / raw)
To: pgsql-interfaces
What is the most efficient way to convert a time_t struct so that I can
insert it into a timestamp field.
Cal McPherson
Software Engineer
ADTEC Communications
Phone: +612 9213 9917 Fax: +612 9281 7575
Email: calm@adtec.com.au
Web: www.adtec.com.au
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: inserting time_t into timestamp field(C language)
@ 2004-03-17 04:26 Bruno Wolff III <bruno@wolff.to>
parent: Cal McPherson <calm@adtec.com.au>
0 siblings, 0 replies; 2+ messages in thread
From: Bruno Wolff III @ 2004-03-17 04:26 UTC (permalink / raw)
To: Cal McPherson <calm@adtec.com.au>; +Cc: 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)
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-03-17 04:26 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-03-17 00:29 inserting time_t into timestamp field(C language) Cal McPherson <calm@adtec.com.au>
2004-03-17 04:26 ` Bruno Wolff III <bruno@wolff.to>
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