Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D16369F946B for ; Thu, 16 Nov 2006 18:28:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 57593-02 for ; Thu, 16 Nov 2006 18:28:02 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from weatherbeeta.co.nz (203-97-50-15.dsl.clear.net.nz [203.97.50.15]) by postgresql.org (Postfix) with SMTP id 14D1E9F946A for ; Thu, 16 Nov 2006 18:28:00 -0400 (AST) Received: (qmail 19311 invoked from network); 16 Nov 2006 22:27:58 -0000 X-NetworkBox-HamSign: 0101;OUT;wbeetanz1;abf2df0b534cbbe32b2b03b2d56b06fb; Received: from unknown (HELO ITLaptop) (172.23.1.199) by 172.23.0.254 with SMTP; 16 Nov 2006 22:27:58 -0000 From: "Phillip Smith" To: "'Judith'" , Subject: Re: Question about time Date: Fri, 17 Nov 2006 11:27:58 +1300 Message-ID: <007001c709ce$783b8cb0$c70117ac@ITLaptop> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AccJzGB6WKvPRpyNR1aBqdLlBBRkqAAAfOTA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 In-Reply-To: <455C8E4F.5060406@correolux.com.mx> X-Scanned-By-wbeetanz1: Virus scan performed by network-box X-Scanned-By-wbeetanz1: Scanner file id is wbeetanz1-1163716078.198-19308-000 X-Scanned-By-wbeetanz1: No known viruses found in message (received+scanned in 0.04/0.17 secs) X-Scanned-By-wbeetanz1: Spam-Check-Result: No, hits=0 required=7 tests= autolearn=no version=2.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/177 X-Sequence-Number: 26829 Try the to_char() function instead of cast() SELECT to_char(fecha_hora_factura, 'HH:MM:SS') FROM nota_venta Cheers, -p -----Original Message----- From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Judith Sent: Friday, 17 November 2006 5:14 AM To: pgsql-sql@postgresql.org Subject: [SQL] Question about time Hi everyone I'm doing a query like this: SELECT CAST(fecha_hora_factura as time) FROM nota_venta and I get: 14:16:52.824395 the field is timestamp type....... I just want the HOUR:MINUTE:SECOND the question is how I drop the millisecond?? Thnx in advanced!!! ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq