pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Phillip Smith <phillips@weatherbeeta.com.au>
To: 'Judith' <jaltamirano@correolux.com.mx>
To: pgsql-sql@postgresql.org
Subject: Re: Question about time
Date: Fri, 17 Nov 2006 11:27:58 +1300
Message-ID: <007001c709ce$783b8cb0$c70117ac@ITLaptop> (raw)
In-Reply-To: <455C8E4F.5060406@correolux.com.mx>

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




view thread (4+ messages)  latest in thread

Message-ID: <007001c709ce$783b8cb0$c70117ac@ITLaptop>
Permalink:  ../007001c709ce$783b8cb0$c70117ac@ITLaptop/
Also on:    postgresql.org/message-id/007001c709ce$783b8cb0$c70117ac@ITLaptop

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: phillips@weatherbeeta.com.au, jaltamirano@correolux.com.mx
  Subject: Re: Question about time
  In-Reply-To: <007001c709ce$783b8cb0$c70117ac@ITLaptop>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox