Re: any way to convert date via libpq?

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Tena Sakai <tsakai(at)gallo(dot)ucsf(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: any way to convert date via libpq?
Date: 2009-03-11 04:55:52
Message-ID: dcc563d10903102155y3ef3fcb3ydf7010aad0346c0b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Mar 10, 2009 at 8:43 PM, Tena Sakai <tsakai(at)gallo(dot)ucsf(dot)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) ;

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tena Sakai 2009-03-11 06:07:33 Re: any way to convert date via libpq?
Previous Message Tena Sakai 2009-03-11 02:43:01 any way to convert date via libpq?