Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 40561632D1D for ; Wed, 11 Mar 2009 01:55:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 57978-08 for ; Wed, 11 Mar 2009 01:55:55 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f176.google.com (mail-gx0-f176.google.com [209.85.217.176]) by mail.postgresql.org (Postfix) with ESMTP id 40A03632B4A for ; Wed, 11 Mar 2009 01:55:53 -0300 (ADT) Received: by gxk24 with SMTP id 24so5439167gxk.19 for ; Tue, 10 Mar 2009 21:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qdwQaPytlnWZHN8m4Fc7GiPgf6+HJxBKoNP9OMb3WHU=; b=KlZtF2FK5vsJCRstxeZ/qOW7gP7kZQKeNYaQKmIUuqX2Q+W70n8qxi6LQFJSF8FCPm 5LCoXG3oExwz3HPSmK1xbnSav4YQ+nhRpNwG0oeyzsExMkQjuTAfEy3jY2o7sMHxYHTy DXOQAd8QzPt1fTNH7SMQ8tUtd8bo32lgHFEIs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=FrF73y3IuiXH5H3mK7gZj/i5Xq/OV4MvKJ69iY33INJC6wLXNyxU1trDq6Ny5e6Tjh lWMnYlcOHkD3YMHADrHZoLpBil1tXvbYtQsPqQ0yqGECbhVANRX1BohfaSAXLQx9mIik IEEU0JP0xro7DPKNZuB/czFqGdMXpXD9qEH90= MIME-Version: 1.0 Received: by 10.151.38.12 with SMTP id q12mr14289262ybj.113.1236747352287; Tue, 10 Mar 2009 21:55:52 -0700 (PDT) In-Reply-To: References: Date: Tue, 10 Mar 2009 22:55:52 -0600 Message-ID: Subject: Re: any way to convert date via libpq? From: Scott Marlowe To: Tena Sakai Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/142 X-Sequence-Number: 31642 On Tue, Mar 10, 2009 at 8:43 PM, Tena Sakai wrote: > Hi Everybody, > > I have a C program to read a postgres table.=A0 One of > the columns of this table is defined as: > > =A0 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) ;