Thread: inserting time_t into timestamp field(C language)

inserting time_t into timestamp field(C language)

From
Cal McPherson
Date:
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



Re: inserting time_t into timestamp field(C language)

From
Bruno Wolff III
Date:
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)