X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 3423F9FA6B2 for ; Sat, 17 Jun 2006 17:08:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 44841-07 for ; Sat, 17 Jun 2006 17:08:21 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web31805.mail.mud.yahoo.com (web31805.mail.mud.yahoo.com [68.142.207.68]) by postgresql.org (Postfix) with SMTP id 4515D9FA5E7 for ; Sat, 17 Jun 2006 17:08:22 -0300 (ADT) Received: (qmail 83167 invoked by uid 60001); 17 Jun 2006 20:08:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=sS+s8HFSx83gIcV1qZWKWMbmlxxWo+A99FJ5Lz02Xav+dO9JgBJaUPzntMEqMWtXQsTEBON0jX6vQ2o8n6ic3mckn7HdSTZ8ZK6S5v4JM0lL/zviTEHTYtWvvg660zyHT7nwxpz9nRUT4FkC1vL84F2SgmSzgkBYdzBMtmIgVIY= ; Message-ID: <20060617200820.83165.qmail@web31805.mail.mud.yahoo.com> Received: from [68.235.218.116] by web31805.mail.mud.yahoo.com via HTTP; Sat, 17 Jun 2006 13:08:20 PDT Date: Sat, 17 Jun 2006 13:08:20 -0700 (PDT) From: Richard Broersma Jr Subject: any additional date_time functions? To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/221 X-Sequence-Number: 25457 I am working with the date_trunc() function with great success especially in the group by clause for aggregates. However, it is limited to returning "WHOLE" time units. i.e. years, months, days, hours, minutes, seconds. Are there any functions similar to date_trunc that can return variable increments i.e.: 5, 10, or 15 minutes increments, 3, 4, 6 hour increments, 1, 2 weekly increments, I imagine that the returned values would have to either be the "floor" or "ceiling" of the actual time stamps. Regards, Richard Broersma Jr.