pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Judith Altamirano Figueroa <jaltamirano@correolux.com.mx>
Cc: pgsql-sql@postgresql.org
Subject: Re: time
Date: Thu, 10 Nov 2005 11:38:12 -0700
Message-ID: <20051110183812.GA21207@winnie.fuhr.org> (raw)
In-Reply-To: <1131647057.3529.272.camel@Desarrollo>
References: <1131635035.3529.143.camel@Desarrollo>
	<1131646287.819.144.camel@home>
	<20051110182139.GA87715@winnie.fuhr.org>
	<1131647057.3529.272.camel@Desarrollo>

[Please copy the mailing list on replies.]

On Thu, Nov 10, 2005 at 12:24:17PM -0600, Judith Altamirano Figueroa wrote:
> excuse me and how can I just get the hour, minute and second

The time type takes an optional precision:

test=> select now()::time;
       now       
-----------------
 11:36:34.124678
(1 row)

test=> select now()::time(0);
   now    
----------
 11:36:34
(1 row)

test=> select now()::time(2);
     now     
-------------
 11:36:34.12
(1 row)

-- 
Michael Fuhr



view thread (10+ messages)  latest in thread

Message-ID: <20051110183812.GA21207@winnie.fuhr.org>
Permalink:  ../20051110183812.GA21207@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20051110183812.GA21207@winnie.fuhr.org

 · 

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: mike@fuhr.org, jaltamirano@correolux.com.mx
  Subject: Re: time
  In-Reply-To: <20051110183812.GA21207@winnie.fuhr.org>

* 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