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 4FFD19DCA5B for ; Tue, 20 Dec 2005 09:20:51 -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 74087-07 for ; Tue, 20 Dec 2005 09:20:54 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtpout.eastlink.ca (smtpout.eastlink.ca [24.222.0.30]) by postgresql.org (Postfix) with ESMTP id AD4ED9DCA72 for ; Tue, 20 Dec 2005 09:20:48 -0400 (AST) Received: from ip02.eastlink.ca ([24.222.10.10]) by mta01.eastlink.ca (Sun Java System Messaging Server 6.2-4.03 (built Sep 22 2005)) with ESMTP id <0IRS00CAYT2MTJL1@mta01.eastlink.ca> for pgsql-sql@postgresql.org; Tue, 20 Dec 2005 09:20:47 -0400 (AST) Received: from blk-137-99-147.eastlink.ca (HELO tickletrunk.engtech.eng) ([24.137.99.147]) by ip02.eastlink.ca with ESMTP; Tue, 20 Dec 2005 09:19:52 -0400 Date: Tue, 20 Dec 2005 09:19:49 -0400 From: Michael Burke Subject: Re: Querying date_time for date only ? In-reply-to: <200512201459.07358.aarni@kymi.com> To: pgsql-sql@postgresql.org, aarni@kymi.com Message-id: <200512200919.49986.michael@engtech.ca> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable Content-disposition: inline X-BrightmailFiltered: true X-Brightmail-Tracker: AAAAAA== References: <200512201459.07358.aarni@kymi.com> User-Agent: KMail/1.8.3 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/173 X-Sequence-Number: 23715 On December 20, 2005 08:59 am, Aarni Ruuhim=E4ki wrote: > Hello List, > > I have a time stamp without time zone field, YYYY-MM-DD hh:mm:ss, in my > table. I want to also find something just for a particular day regardless > of the time. > > (Pg)SQL way to do this ? You can try, SELECT field::date FROM mytable; to select only the date part. Likewise, you can use field::time if you wan= t=20 to disregard the date. > TIA, > > Aarni HTH. Mike. =2D-=20 Michael Burke michael@engtech.ca