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 06:15:14
Message-ID: dcc563d10903102315p75de132bp531ba0ba62205189@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Mar 11, 2009 at 12:07 AM, Tena Sakai <tsakai(at)gallo(dot)ucsf(dot)edu> wrote:
> Hi Scott,
>
> Many thanks for your reply.
> I just tried:
>   select extract (epoch from timestamp with time zone '2008-04-04
> 20:00:0.0');
> and got:
>   1207364400
> which is great!
>
> I suppose there is no problem running this query
> via PGexec() in a C program?  Something like:
>   result = PGexec (conn, "FETCH ALL from somePort");

It's definitely accessable by anything connecting to the db. Not sure
how that's done in C so someone else will have to chip in on that.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Yann Collavoli 2009-03-11 13:02:21 Problem database access
Previous Message Tena Sakai 2009-03-11 06:07:33 Re: any way to convert date via libpq?