Re: time

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Judith Altamirano Figueroa <jaltamirano(at)correolux(dot)com(dot)mx>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: time
Date: 2005-11-10 18:38:12
Message-ID: 20051110183812.GA21207@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

[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

In response to

  • Re: time at 2005-11-10 18:21:39 from Michael Fuhr

Browse pgsql-sql by date

  From Date Subject
Next Message Jaime Casanova 2005-11-10 19:02:39 Re: [SQL] Como ejecutar una funcion insert en plpgsql....
Previous Message Rod Taylor 2005-11-10 18:27:10 Re: time