Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id DDC509F976E for ; Thu, 16 Nov 2006 19:19:33 -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 76693-05 for ; Thu, 16 Nov 2006 19:19:28 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 327EE9F942F for ; Thu, 16 Nov 2006 19:19:27 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mis010-1.exch010.intermedia.net (mis010-1.exch010.intermedia.net [64.78.61.91]) by svr4.postgresql.org (Postfix) with ESMTP id 306395AF96C for ; Thu, 16 Nov 2006 23:19:25 +0000 (GMT) Received: from ehost010-33.exch010.intermedia.net ([64.78.20.173]) by mis010-1.exch010.intermedia.net with Microsoft SMTPSVC(6.0.3790.1830); Thu, 16 Nov 2006 15:19:21 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Re: Question about time Date: Thu, 16 Nov 2006 15:19:17 -0800 Message-ID: <8C5B026B51B6854CBE88121DBF097A865D4530@ehost010-33.exch010.intermedia.net> In-Reply-To: <1163715824.692.1.camel@pampa> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SQL] Question about time Thread-Index: AccJzlfXSqATKw/aRN6wEqqFbBCwiQABxxyw From: "Hector Villarreal" To: "Joe" , "Judith" Cc: X-OriginalArrivalTime: 16 Nov 2006 23:19:21.0714 (UTC) FILETIME=[A5C45520:01C709D5] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/179 X-Sequence-Number: 26831 Try this one:=20 SELECT date_trunc('seconds',now())::time; "15:11:42" So it should be select date_trunc('seconds', fecha_hora_factura)::time from nota_venta; -----Original Message----- From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Joe Sent: Thursday, November 16, 2006 2:24 PM To: Judith Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Question about time On Thu, 2006-11-16 at 10:14 -0600, Judith wrote: > Hi everyone I'm doing a query like this: >=20 > SELECT CAST(fecha_hora_factura as time) FROM nota_venta >=20 > and I get: >=20 > 14:16:52.824395 >=20 > the field is timestamp type....... I just want the HOUR:MINUTE:SECOND >=20 > the question is how I drop the millisecond?? Take a look at date_trunc() under Date/Time Functions and Operators. Joe ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate