Received: from ocis.ocis.net (root@ocis.ocis.net [209.52.173.1]) by hub.org (8.8.8/8.7.5) with ESMTP id QAA08896 for ; Fri, 26 Jun 1998 16:11:52 -0400 (EDT) Received: from mail.ocis.net (colin.ocis.net [209.52.173.6]) by ocis.ocis.net (8.9.0/8.9.0) with ESMTP id NAA18568 for ; Fri, 26 Jun 1998 13:09:32 -0700 Message-ID: <35940090.3D748711@mail.ocis.net> Date: Fri, 26 Jun 1998 13:12:00 -0700 From: Colin Dick Organization: On Call Internet Services X-Mailer: Mozilla 4.04 [en] (Win95; I) MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Date fields and libpq.... Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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