On Tue, Apr 08, 2003 at 11:38:38AM +0300, Peter Nixon wrote:
> date_truc seems to only lower precision which is not what I want.
> For instance if the value in my TIMESTAMP field is:
> 2001-02-16 20:38:40
> I want a function that outputs:
> 20:38:40
> ie the time, WITHOUT the date part of the field.
Just cast it:
# select cast('2001-02-16 20:38:40'::timestamp as time);
?column?
----------
20:38:40
(1 row)
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> "the West won the world not by the superiority of its ideas or values or
> religion but rather by its superiority in applying organized violence.
> Westerners often forget this fact, non-Westerners never do."
> - Samuel P. Huntington