Re: Question about time

From: "Phillip Smith" <phillips(at)weatherbeeta(dot)com(dot)au>
To: "'Judith'" <jaltamirano(at)correolux(dot)com(dot)mx>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Question about time
Date: 2006-11-16 22:27:58
Message-ID: 007001c709ce$783b8cb0$c70117ac@ITLaptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)postgresql(dot)org [mailto:pgsql-sql-owner(at)postgresql(dot)org]
On Behalf Of Judith
Sent: Friday, 17 November 2006 5:14 AM
To: pgsql-sql(at)postgresql(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Hector Villarreal 2006-11-16 23:19:17 Re: Question about time
Previous Message Joe 2006-11-16 22:23:44 Re: Question about time