From: Scott Marlowe <scott.marlowe@gmail.com>
To: Tena Sakai <tsakai@gallo.ucsf.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: any way to convert date via libpq?
Date: Tue, 10 Mar 2009 22:55:52 -0600
Message-ID: <dcc563d10903102155y3ef3fcb3ydf7010aad0346c0b@mail.gmail.com> (raw)
In-Reply-To: <FE44E0D7EAD2ED4BB2165071DB8E328C0378F7CE@egcrc-ex01.egcrc.org>
References: <FE44E0D7EAD2ED4BB2165071DB8E328C0378F7CE@egcrc-ex01.egcrc.org>
On Tue, Mar 10, 2009 at 8:43 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
> Hi Everybody,
>
> I have a C program to read a postgres table. One of
> the columns of this table is defined as:
>
> timestamp without time zone
>
> Is there any routine/function that I can use to convert
> this field/column value into unix/linux style date for
> comparison purpose?
select extract('epoch' from timestampfield) ;
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-admin@postgresql.org
Cc: scott.marlowe@gmail.com, tsakai@gallo.ucsf.edu
Subject: Re: any way to convert date via libpq?
In-Reply-To: <dcc563d10903102155y3ef3fcb3ydf7010aad0346c0b@mail.gmail.com>
* 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