X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6F97A8B9C6C for ; Wed, 2 Feb 2005 03:46:34 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 46633-09 for ; Wed, 2 Feb 2005 03:46:27 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 3B9B48B9C1E for ; Wed, 2 Feb 2005 03:46:29 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id j123jaQI009049 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 1 Feb 2005 20:45:39 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id j123javC009553; Tue, 1 Feb 2005 20:45:36 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id j123jZMp009494; Tue, 1 Feb 2005 20:45:35 -0700 (MST) (envelope-from mfuhr) Date: Tue, 1 Feb 2005 20:45:35 -0700 From: Michael Fuhr To: "Muhyiddin A.M Hayat" Cc: Franco Bruno Borghesi , pgsql-sql@postgresql.org Subject: Re: Calendar Function Message-ID: <20050202034535.GA98781@winnie.fuhr.org> References: <03a001c50545$6bd942d0$1f00a8c0@middinks> <41FA5E6A.50002@akyasociados.com.ar> <018901c508d2$55bc3800$1f00a8c0@middinks> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <018901c508d2$55bc3800$1f00a8c0@middinks> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/39 X-Sequence-Number: 20150 On Wed, Feb 02, 2005 at 10:53:09AM +0800, Muhyiddin A.M Hayat wrote: > > But if i would like to display date in one Month, You could use the given function with a few changes. For example, given an arbitrary date, you could use date_trunc() to find the first day of that date's month, add an interval of 1 month to find the first day of the following month, and use a loop to return the dates up to but not including the latter value. For more information, see the "Date/Time Functions and Operators" section in the "Functions and Operators" chapter of the documentation: http://www.postgresql.org/docs/8.0/static/functions-datetime.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/