Date fields and libpq.... - Mailing list pgsql-sql

From Colin Dick
Subject Date fields and libpq....
Date
Msg-id 35940090.3D748711@mail.ocis.net
Whole thread Raw
Responses Re: [SQL] Date fields and libpq....  (Colin Dick <cdick@mail.ocis.net>)
List pgsql-sql
Hi there,
    I am doing a query on a date field and would like the answer in
epoch time as apposed to a string.  I am using PQgetvalue(res,i,0) and
can successfully get the string date as a response.  Is it possible to
get an epoch result or do I have to write my own routine to parse the
string into the tm struct so I can use mktime to get the epoch.  The
latter solution seems quite a hassle and if anyone has a better
solution, please let me know.  Thanks have a good weekend.

--
Colin Dick
Admin, On Call Internet Services
cdick@mail.ocis.net


pgsql-sql by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [SQL] isnull function]
Next
From: Colin Dick
Date:
Subject: Re: [SQL] Date fields and libpq....