Re: time - Mailing list pgsql-sql

From Michael Fuhr
Subject Re: time
Date
Msg-id 20051110183812.GA21207@winnie.fuhr.org
Whole thread Raw
In response to time  (Judith Altamirano Figueroa <jaltamirano@correolux.com.mx>)
List 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


pgsql-sql by date:

Previous
From: Rod Taylor
Date:
Subject: Re: time
Next
From: Tom Lane
Date:
Subject: Re: time