Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id DAE419FB2D3 for ; Fri, 10 Nov 2006 19:00:08 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 55288-06 for ; Fri, 10 Nov 2006 23:00:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from vms048pub.verizon.net (vms048pub.verizon.net [206.46.252.48]) by postgresql.org (Postfix) with ESMTP id A415C9F9F74 for ; Fri, 10 Nov 2006 19:00:05 -0400 (AST) Received: from [192.168.7.5] ([71.101.12.218]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0J8J00KDDEJRATP4@vms048.mailsrvcs.net> for pgsql-sql@postgresql.org; Fri, 10 Nov 2006 16:59:52 -0600 (CST) Date: Fri, 10 Nov 2006 18:00:49 -0500 From: Joe Subject: Re: Between and miliseconds (timestamps) In-reply-to: <55c095e90611101034r7dc6bf1btba72aa24f9300593@mail.gmail.com> To: Ezequias Rodrigues da Rocha Cc: "A. Kretschmer" , pgsql-sql@postgresql.org Message-id: <1163199650.682.9.camel@pampa> Organization: Freedom Circle, LLC MIME-version: 1.0 X-Mailer: Evolution 2.8.1.1 FreeBSD GNOME Team Port Content-type: text/plain Content-transfer-encoding: 7bit References: <55c095e90611100628m1322eea5jeeca3a94d90e1eb1@mail.gmail.com> <20061110144458.GA2909@a-kretschmer.de> <55c095e90611100650q3ec0ec27tc0f8e94a0eb032eb@mail.gmail.com> <20061110152427.GA3634@a-kretschmer.de> <55c095e90611101034r7dc6bf1btba72aa24f9300593@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/118 X-Sequence-Number: 26770 Hi Ezequias, On Fri, 2006-11-10 at 16:34 -0200, Ezequias Rodrigues da Rocha wrote: > Ok thank you very much, but the suggestion (SQL:when field = > '2006-09-06'::date) does not retrieve any row. It does not retrive any > error too, but the suggestion does not applied to my requisition. I think you want to cast the field, not the constant, e.g., testdb=> select * from t2 where date(tm) = '2006-9-6'; tm ------------------------------- 2006-09-06 00:00:01-04 2006-09-06 23:59:59.999999-04 (2 rows) Joe