Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TSyAu-0006Os-Eu for pgsql-sql@postgresql.org; Mon, 29 Oct 2012 22:51:16 +0000 Received: from na3sys009aog120.obsmtp.com ([74.125.149.140]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TSyAt-0007V4-AO for pgsql-sql@postgresql.org; Mon, 29 Oct 2012 22:51:15 +0000 Received: from mail-qa0-f46.google.com ([209.85.216.46]) (using TLSv1) by na3sys009aob120.postini.com ([74.125.148.12]) with SMTP ID DSNKUI8IYsARUPvrBUHws8IZtTK+srGDu2wi@postini.com; Mon, 29 Oct 2012 15:51:15 PDT Received: by mail-qa0-f46.google.com with SMTP id c26so1835126qad.19 for ; Mon, 29 Oct 2012 15:51:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:x-gm-message-state; bh=vqas02AkVIkBa49bm2rfp7uvmwaSXGPC49i21uRV/7w=; b=a7KVeHgHnHDD7Epn8PT/B6Lue/o0aRpqRc2fOmowLcikvfkuswuhki6Xg462UkKPQq qEJreJWYaCXEnKsbeT2dMdC/HIOVdW6696QjnnQ/OirtKhB2jvGSbBiMm/AUqWQUS8AW 2V3eRmIdsBlu0qJDVd47fgHStaN57vTMqFoRfiB+FRaJU6OoFYoS5kab51XSrkecMBym 4c2chtSbiZ3VNcy8D3ffTIv0zbncPEWbpka8FBAqH4Z/uYUhGK3/K1ITp5xcEfMkdqQQ q9OK3UY+6bHXXoOVGP+wuDps8ZZz5WSjY3ehTdcshGn0NzuvYw+z1FhDsLvrH43/3v98 u5tQ== Received: by 10.49.29.103 with SMTP id j7mr23666770qeh.47.1351551073878; Mon, 29 Oct 2012 15:51:13 -0700 (PDT) Received: from [198.206.42.50] (rrcs-24-172-201-241.central.biz.rr.com. [24.172.201.241]) by mx.google.com with ESMTPS id p11sm6762566qaz.16.2012.10.29.15.51.13 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Oct 2012 15:51:13 -0700 (PDT) Message-ID: <508F0864.4040609@noaa.gov> Date: Mon, 29 Oct 2012 18:51:16 -0400 From: Mark Fenbers User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Fun with Dates References: <508F0576.4020404@noaa.gov> In-Reply-To: Content-Type: multipart/mixed; boundary="------------090700040106050301090907" X-Gm-Message-State: ALoCoQkCKT7QJjKWB4l5PnPQMFLMAy1KyS+++Q6Cs5NiUwWqwT3TR+f5aqInQWha4y4Ap6B2jwKo X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201210/59 X-Sequence-Number: 36930 This is a multi-part message in MIME format. --------------090700040106050301090907 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Or the other way round: anything that is equal or greater than the first
of the current month:

select ...
from foobar
where obstime >= date_trunc('month', current_date);
I knew it had to be something simple!   thanks!
Mark
--------------090700040106050301090907 Content-Type: text/x-vcard; charset=utf-8; name="mark_fenbers.vcf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="mark_fenbers.vcf" YmVnaW46dmNhcmQNCmZuOk1hcmsgRmVuYmVycw0KbjpGZW5iZXJzO01hcmsNCm9yZzpPaGlv IFJpdmVyIEZvcmVjYXN0IENlbnRlcjtIeWRyb21ldGVvcm9sb2dpY2FsIEFuYWx5c2lzICYg U3VwcG9ydCBVbml0DQphZHI6MTkwMSBTb3V0aCBPSC0xMzQ7O05hdGlvbmFsIFdlYXRoZXIg U2VydmljZTtXaWxtaW5ndG9uO09IOzQ1MTc3LTk3MDg7VVNBDQplbWFpbDtpbnRlcm5ldDpN YXJrLkZlbmJlcnNAbm9hYS5nb3YNCnRpdGxlOlNlbmlvciBNZXRlb3JvbG9naXN0DQp0ZWw7 d29yazo5MzctMzgzLTA0MzANCnRlbDtmYXg6OTM3LTM4My0wMDMzDQp1cmw6d2VhdGhlci5n b3Yvb2hyZmMNCnZlcnNpb246Mi4xDQplbmQ6dmNhcmQNCg0K --------------090700040106050301090907--