Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 10434632BEB for ; Tue, 5 Jan 2010 21:50:26 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 41999-06 for ; Wed, 6 Jan 2010 01:50:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yx0-f192.google.com (mail-yx0-f192.google.com [209.85.210.192]) by mail.postgresql.org (Postfix) with ESMTP id 8298F63233E for ; Tue, 5 Jan 2010 21:50:15 -0400 (AST) Received: by yxe30 with SMTP id 30so19043980yxe.29 for ; Tue, 05 Jan 2010 17:50:13 -0800 (PST) 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; bh=F8trPvQZK2Z+1JdHLU2j32s/9AbMbpQ14wHncBA2/Fw=; b=XJO3d2/lz91wVDXn1aUmkNffvfjdmSaakodCIHEtOvCIBEAG2oZmnnTuaPHlN+xZDd WEJr3QsfJn27X5AOM48lf9mg/xzUWRRcqLKX6+UBfy7fuHCL1VJxi0PUq33Y7KU00LEA MwimCn7qWFkfK1zu3U+2tw33kImK/nmBJpgdQ= 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; b=OB8IyjbMvBTlpLyPgRegj8fBD1hTdIRlaATdtZHNiZ6f5Mc1atBeVsRKp65EnmaWlT qOycXhcdioVidtIpY0qx+6dhI1Xhn9S91hA07mHo3KYpgZOR/wCAg64ck1ZMw2X1mQxQ bUUmAv4/vR0H1j4dOSy8n8wSq3lxr35qgSo8Y= MIME-Version: 1.0 Received: by 10.90.229.4 with SMTP id b4mr3502950agh.113.1262742613594; Tue, 05 Jan 2010 17:50:13 -0800 (PST) In-Reply-To: <4B43E887.6040402@gmail.com> References: <4B43E887.6040402@gmail.com> Date: Tue, 5 Jan 2010 18:50:13 -0700 Message-ID: <37d451f71001051750q4d3fc5c9x355567af329fadb@mail.gmail.com> Subject: Re: getting extract to always return number of hours From: Rosser Schwarz To: Chris Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.448 tagged_above=-10 required=5 tests=BAYES_20=-0.74, FH_DATE_PAST_20XX=3.188 X-Spam-Level: ** X-Archive-Number: 201001/3 X-Sequence-Number: 33539 On Tue, Jan 5, 2010 at 6:33 PM, Chris wrote: > I'm trying to get extract() to always return the number of hours between two > time intervals, ala: SELECT extract(epoch from timeend - timestart) / 3600 from t1; rls -- :wq