X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0D0BB9DC859 for ; Tue, 13 Dec 2005 18:34:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47373-03 for ; Tue, 13 Dec 2005 18:34:36 -0400 (AST) Received: from hub.org (hub.org [200.46.204.220]) by postgresql.org (Postfix) with ESMTP id 1C2FF9DC84B for ; Tue, 13 Dec 2005 18:34:33 -0400 (AST) Received: from localhost (unknown [200.46.204.144]) by hub.org (Postfix) with ESMTP id 67E4562C84C for ; Tue, 13 Dec 2005 18:34:36 -0400 (AST) Received: from hub.org ([200.46.204.220]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 46316-08 for ; Tue, 13 Dec 2005 18:34:34 -0400 (AST) Received: from ganymede.hub.org (blk-222-82-85.eastlink.ca [24.222.82.85]) by hub.org (Postfix) with ESMTP id 6C3D562C845 for ; Tue, 13 Dec 2005 18:34:34 -0400 (AST) Received: by ganymede.hub.org (Postfix, from userid 1000) id B7F92499B4; Tue, 13 Dec 2005 18:34:36 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id B423B45B3E for ; Tue, 13 Dec 2005 18:34:36 -0400 (AST) Date: Tue, 13 Dec 2005 18:34:36 -0400 (AST) From: "Marc G. Fournier" X-X-Sender: scrappy@ganymede.hub.org To: pgsql-sql@postgresql.org Subject: # of 5 minute intervals in period of time ... Message-ID: <20051213183044.X1070@ganymede.hub.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.587 required=5 tests=[AWL=0.587] X-Spam-Score: 0.587 X-Spam-Level: X-Archive-Number: 200512/105 X-Sequence-Number: 23647 Is there a simpler way of doing this then: select (date_part('epoch', now()) - date_part('epoch', now() - '30 days'::interval)) / ( 5 * 60 ); ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664