Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id C212C9FBD00 for ; Mon, 4 Jun 2007 12:27:46 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 42663-03 for ; Mon, 4 Jun 2007 12:27:42 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id BE28B9FBCDB for ; Mon, 4 Jun 2007 12:27:43 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1HvET8-0000Lc-Au for pgsql-sql@postgresql.org; Mon, 04 Jun 2007 11:27:42 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id CA98C3F9E; Mon, 4 Jun 2007 11:27:36 -0400 (EDT) Date: Mon, 4 Jun 2007 11:27:36 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: current_date / datetime stuff Message-ID: <20070604152736.GS32320@phlogiston.dyndns.org> References: <46642A05.40708@joshuaneil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46642A05.40708@joshuaneil.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/15 X-Sequence-Number: 28505 On Mon, Jun 04, 2007 at 10:04:37AM -0500, Joshua wrote: > that will return the date of the first Monday of the month? I guess you need to write a function to do this. I suppose you could do it by finding out what day of the week it is and what the date is, then counting backwards to the earliest possible Monday. A -- Andrew Sullivan | ajs@crankycanuck.ca When my information changes, I alter my conclusions. What do you do sir? --attr. John Maynard Keynes