Re: [SQL] Date fields and libpq....

From: Colin Dick <cdick(at)mail(dot)ocis(dot)net>
To: Kachun Lee <kachun(at)pathlink(dot)com>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] Date fields and libpq....
Date: 1998-06-26 21:17:17
Message-ID: Pine.LNX.3.96.980626140758.20477B-100000@ocis.ocis.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> I think you may want to change your query to:
>
> select date_part(datetime(abst_att), 'epoch') ....
>
> In addition, unless you were using BINARY cursor, you will need to do
> something like:
>
> time_t t = atol(PQgetvalue(res, i, 0));

I have tried this but don't think I understand the internal datetime
function correctly. Should my query be(start is defined as abstime):

select start(datetime(abst_att),'epoch') from timebase;

And then should this work:

printf("%lu\n",(unsigned long)PGgetvalue(res,0,0));

Thanks for your help.

--
Colin Dick
On Call Internet Services
cdick(at)mail(dot)ocis(dot)net

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Kachun Lee 1998-06-26 22:05:40 Re: [SQL] Date fields and libpq....
Previous Message Kachun Lee 1998-06-26 20:42:57 Re: [SQL] Date fields and libpq....